mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-27 04:19:58 +01:00
83 lines
No EOL
2 KiB
Text
83 lines
No EOL
2 KiB
Text
{
|
|
"env": {
|
|
"browser": true,
|
|
"node": true,
|
|
"es6": true
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:react-hooks/recommended",
|
|
// "plugin:jsx-a11y/recommended",
|
|
"eslint-config-prettier",
|
|
"plugin:@typescript-eslint/recommended",
|
|
],
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"warnOnUnsupportedTypeScriptVersion": false
|
|
},
|
|
"settings": {
|
|
"react": {
|
|
"version": "detect"
|
|
},
|
|
"import/resolver": {
|
|
"node": {
|
|
"paths": [
|
|
"src"
|
|
],
|
|
"extensions": [
|
|
".js",
|
|
".jsx",
|
|
".ts",
|
|
".tsx"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"plugins": ["react-refresh"],
|
|
"rules": {
|
|
"no-console": "error",
|
|
// "no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
"react-refresh/only-export-components": [
|
|
"warn",
|
|
{ "allowConstantExport": true }
|
|
],
|
|
"react/jsx-uses-react": "off",
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"patterns": [
|
|
{
|
|
"group": ["**/dataProvider"],
|
|
"importNames": ["httpClient"],
|
|
"message": "Do not call httpClient directly. Add a method to wrapperDataProvider and call it through useDirectDataProvider(), or add the Subsonic call to src/subsonic."
|
|
},
|
|
{
|
|
"group": ["**/dataProvider/httpClient"],
|
|
"message": "Do not call httpClient directly. Add a method to wrapperDataProvider and call it through useDirectDataProvider(), or add the Subsonic call to src/subsonic."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["src/dataProvider/**", "src/subsonic/**"],
|
|
"rules": { "no-restricted-imports": "off" }
|
|
}
|
|
],
|
|
// Fix Vitest
|
|
"globals": {
|
|
"describe": "readonly",
|
|
"it": "readonly",
|
|
"expect": "readonly",
|
|
"vi": "readonly",
|
|
"beforeAll": "readonly",
|
|
"afterAll": "readonly",
|
|
"beforeEach": "readonly",
|
|
"afterEach": "readonly",
|
|
}
|
|
} |