runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
319 stars 38 forks source link

tsconfig `extends` property not followed #156

Open matthias-ccri opened 3 years ago

matthias-ccri commented 3 years ago

I have a project structure with a root tsconfig and multiple projects, each with a tsconfig that extends from the root tsconfig, using the extends keyword. I want to be able to have a shared configuration in the root tsconfig, with all packages inherit that rule set.

Currently, rules listed in the root tsconfig are not recognized, even though the project tsconfig extends from the root. However, when I add the rules to a project tsconfig, the rules work properly.

I'm running: npx lit-analyzer src.

Root tsconfig:

{
    "compilerOptions": {
        "plugins": [
            {
                "name": "ts-lit-plugin",
                "strict": true,
                "rules": {
                    "no-unknown-tag-name": "error",
                    "no-unknown-event": "warn"
                }
            }
        ],
        "esModuleInterop": true,
        "experimentalDecorators": true,
        "useDefineForClassFields": true,
        "declaration": true,
        "sourceMap": true,
        "inlineSources": true,
        "skipLibCheck": true,
        "strict": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noFallthroughCasesInSwitch": true,
        "target": "ES2017",
        "moduleResolution": "node",
        "types": [],
        "preserveSymlinks": true,
    }
}

Project tsconfig:

{
    "extends": "../../tsconfig",
    "compilerOptions": {
        "outDir": "lib",
    },
    "include": [
        "src/app/**/*"
    ]
}

If you need a full repro let me know! Thanks.