1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 17:17:12 +00:00
bazarr/frontend/.eslintrc.json
2024-08-29 16:49:13 +09:00

70 lines
1.8 KiB
JSON

{
"rules": {
"no-console": "error",
"camelcase": "warn",
"no-restricted-imports": [
"error",
{
"patterns": ["..*"]
}
],
"simple-import-sort/imports": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-unused-vars": "warn"
},
"extends": [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["testing-library", "simple-import-sort", "react-refresh"],
"overrides": [
{
"files": [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)"
],
"extends": ["plugin:testing-library/react"]
},
{
"files": ["*.ts", "*.tsx"],
"rules": {
"simple-import-sort/imports": [
"error",
{
"groups": [
[
// React Packages
"^react",
// Mantine Packages
"^@mantine/",
// Vendor Packages
"^(\\w|@\\w)",
// Side Effect Imports
"^\\u0000",
// Internal Packages
"^@/\\w",
// Parent Imports
"^\\.\\.(?!/?$)",
"^\\.\\./?$",
// Relative Imports
"^\\./(?=.*/)(?!/?$)",
"^\\.(?!/?$)",
"^\\./?$",
// Style Imports
"^.+\\.?(css)$"
]
]
}
]
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
}
}