Skip to content

Commit

Permalink
Allow non-relative imports starting with src/ or vendor/ (#825)
Browse files Browse the repository at this point in the history
* Allow non-relative imports starting with src/ or vendor/

* Fix lint errors

* Small fix

* Minor ESLint rule tweaks

* Exclude webpack configs from tsconfig

* One last tweak
  • Loading branch information
fredrikekelund authored Jan 22, 2025
1 parent 7af2222 commit 9970144
Show file tree
Hide file tree
Showing 9 changed files with 1,074 additions and 578 deletions.
20 changes: 18 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"root": true,
"env": {
"browser": true,
"es6": true,
Expand All @@ -16,7 +17,14 @@
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [ "prettier", "jest-dom" ],
"plugins": [ "@typescript-eslint", "prettier", "jest-dom" ],
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"@typescript-eslint/no-explicit-any": [ "error", { "ignoreRestArgs": true } ],
"@typescript-eslint/no-unused-vars": [
Expand All @@ -39,5 +47,13 @@
"groups": [ "builtin", "external", "internal", "parent", "sibling", "index", "type" ]
}
]
}
},
"overrides": [
{
"files": ["*.ts", "src/tests/**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/no-require-imports": "off"
}
}
]
}
Loading

0 comments on commit 9970144

Please sign in to comment.