103 lines
2.7 KiB
JSON
103 lines
2.7 KiB
JSON
{
|
|
"env": {
|
|
"es2022": true,
|
|
"node": true
|
|
},
|
|
"parserOptions": {
|
|
"sourceType": "module",
|
|
"ecmaVersion": 2022
|
|
},
|
|
"settings": {
|
|
"import/resolver": {
|
|
"typescript": {}
|
|
},
|
|
"boundaries/elements": [
|
|
{
|
|
"type": "website",
|
|
"pattern": "apps/website/**/*"
|
|
},
|
|
{
|
|
"type": "api",
|
|
"pattern": "apps/api/**/*"
|
|
},
|
|
{
|
|
"type": "adapters",
|
|
"pattern": ["adapters/**/*", "@adapters/**/*"]
|
|
},
|
|
{
|
|
"type": "core",
|
|
"pattern": ["core/**/*", "@core/**/*"]
|
|
}
|
|
]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/index.ts", "**/index.tsx"],
|
|
"rules": {
|
|
"no-restricted-syntax": [
|
|
"error",
|
|
{
|
|
"selector": "Program",
|
|
"message": "index.ts files are forbidden. Use explicit file names instead (e.g., UserService.ts, not index.ts)."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["**/*.ts", "**/*.tsx"],
|
|
"parser": "@typescript-eslint/parser",
|
|
"plugins": ["@typescript-eslint", "boundaries", "import"],
|
|
"extends": ["plugin:import/recommended", "plugin:import/typescript"],
|
|
"rules": {
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"args": "all",
|
|
"argsIgnorePattern": "^$",
|
|
"vars": "all",
|
|
"varsIgnorePattern": "^$",
|
|
"caughtErrors": "all"
|
|
}
|
|
],
|
|
"boundaries/element-types": [
|
|
2,
|
|
{
|
|
"default": "disallow",
|
|
"rules": [
|
|
{
|
|
"from": ["website"],
|
|
"allow": ["website"]
|
|
},
|
|
{
|
|
"from": ["api"],
|
|
"allow": ["api", "adapters", "core"]
|
|
},
|
|
{
|
|
"from": ["adapters"],
|
|
"allow": ["adapters", "core"]
|
|
},
|
|
{
|
|
"from": ["core"],
|
|
"allow": ["core"]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"import/no-default-export": "error",
|
|
"import/no-useless-path-segments": "error",
|
|
"no-restricted-syntax": [
|
|
"error",
|
|
{
|
|
"selector": "ExportDefaultDeclaration",
|
|
"message": "Default exports are forbidden. Use named exports instead."
|
|
},
|
|
{
|
|
"selector": "TSInterfaceDeclaration[id.name=/^I[A-Z]/]",
|
|
"message": "Interface names should not start with 'I'. Use descriptive names without the 'I' prefix (e.g., 'LiverCompositor' instead of 'ILiveryCompositor')."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |