-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Eric Hegnes <eric@hegnes.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
App 2 🤌✨ Deployment complete! Take a peek over at https://6a84f9ae.app2-9yo.pages.dev |
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' |
There was a problem hiding this comment.
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.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additive diagnostics without format.
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 |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
efm-langserver | ||
eslint_d |
There was a problem hiding this comment.
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>
No description provided.