Skip to content

feat: add eslint; more lint more better #4618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add eslint; more lint more better #4618

wants to merge 2 commits into from

Conversation

ehegnes
Copy link
Contributor

@ehegnes ehegnes commented May 26, 2025

No description provided.

Signed-off-by: Eric Hegnes <eric@hegnes.com>
@ehegnes ehegnes requested review from cor and Swepool May 26, 2025 18:26
Copy link

vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
site ⬜️ Ignored (Inspect) Visit Preview May 26, 2025 9:22pm

Copy link

github-actions bot commented May 26, 2025

App 2 🤌

✨ Deployment complete! Take a peek over at https://6a84f9ae.app2-9yo.pages.dev
✨ Deployment alias URL: https://head.app2-9yo.pages.dev


Comment on lines +7 to +15
eslint-lint: &eslint-lint
lint-command: 'eslint_d --format unix --stdin --stdin-filename "${INPUT}"'
lint-stdin: true
lint-ignore-exit-code: true
lint-formats:
- '%f:%l:%c: %m [%trror]'
- '%f:%l:%c: %m [%tarning]'
root-markers:
- 'eslint.config.ts'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What efm-langserver runs for a given input.

Comment on lines -76 to +87
auto-format = true
formatter = { command = "treefmt", args = ["--stdin", ".js"] }
language-servers = [{ name = "typescript-language-server", except-features = ["format"] }]
name = "javascript"
auto-format = true
formatter = { command = "treefmt", args = ["--stdin", ".js"] }
language-servers = [
{ name = "typescript-language-server", except-features = ["format"] },
{ name = "efm-langserver", except-features = ["format"] },
]
name = "javascript"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additive diagnostics without format.

Comment on lines +1 to +15
import { includeIgnoreFile } from "@eslint/compat"
import * as U from "@unionlabs/eslint-config"
import type { Linter } from "eslint"
import svelteConfig from "./svelte.config.js"

const gitignore = includeIgnoreFile(
new URL(import.meta.resolve("./.gitignore")).pathname,
)

const config: Linter.Config[] = [
gitignore,
...U.configs.svelte(svelteConfig),
]

export default config
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much simpler and more consistent.

@@ -0,0 +1,38 @@
{
"name": "@unionlabs/eslint-config",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New workspace project to contain ESLint config for various projects. Currently supports JS, TS, and Svelte.

Changes to this project update in real-time for sibling workspace projects given that we are exporting TS and using workspace linking.

Comment on lines +510 to +511
efm-langserver
eslint_d
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New flake deps.

Signed-off-by: Eric Hegnes <eric@hegnes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant