d934feb02a
* feature: add no-trigger-core-import * fix: handle aliases and limit to exported modules * fix: use longest export map name * fix: support export type and interface * fix: simplify message when export map is needed * feature: fine grained modules for core * fix: add prerequisite lint plugins * fix: why do I have to fix these components again??? * fix: tests * Add eslint config and vscode settings * Create yellow-roses-arrive.md * Remove the vscode linting This is temporary so no one fixes these until we merge the remix branch --------- Co-authored-by: Eric Allam <eric@trigger.dev> Co-authored-by: Eric Allam <eallam@icloud.com> Co-authored-by: Matt Aitken <matt@mattaitken.com>
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
{
|
|
"plugins": [
|
|
"@trigger.dev/eslint-plugin",
|
|
"react-hooks",
|
|
"@typescript-eslint/eslint-plugin",
|
|
"import"
|
|
],
|
|
"parser": "@typescript-eslint/parser",
|
|
"overrides": [
|
|
{
|
|
"files": ["*.ts", "*.tsx"],
|
|
"rules": {
|
|
// Autofixes imports from "@trigger.dev/core" to fine grained modules
|
|
"@trigger.dev/no-trigger-core-import": "error",
|
|
// Normalize `import type {}` and `import { type }`
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
"warn",
|
|
{
|
|
// the "type" annotation can get tangled and cause syntax errors
|
|
// during some autofixes, so easier to just turn it off
|
|
"prefer": "type-imports",
|
|
"disallowTypeAnnotations": true,
|
|
"fixStyle": "inline-type-imports"
|
|
}
|
|
],
|
|
// no-trigger-core-import splits imports into multiple lines
|
|
// this one merges them back into a single line
|
|
// if they still import from the same module
|
|
"import/no-duplicates": ["warn", { "prefer-inline": true }],
|
|
// lots of undeclared vars, enable this rule if you want to clean them up
|
|
"turbo/no-undeclared-env-vars": "off"
|
|
}
|
|
}
|
|
],
|
|
"ignorePatterns": ["seed.js", "seedCloud.ts", "populate.js"]
|
|
}
|