9c5f834334
Replaces the FlatCompat shim (which loaded .eslintrc.cjs via @eslint/eslintrc and emitted deprecation warnings) with a native ESLint 9 flat config. Adds typescript-eslint meta-package as the flat-config entrypoint and pins @eslint/js to v9 to satisfy the eslint@9 peer range. Rule set is preserved verbatim from the Phase 1A-1 plan (Task 4).
56 lines
1.4 KiB
JavaScript
56 lines
1.4 KiB
JavaScript
// ESLint v9 flat config. Mirrors the rule set from
|
|
// docs/superpowers/plans/2026-04-14-phase-1a1-skeleton.md (Task 4).
|
|
import js from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
import unusedImports from "eslint-plugin-unused-imports";
|
|
|
|
export default [
|
|
{
|
|
ignores: [
|
|
"dist/**",
|
|
"node_modules/**",
|
|
"ClientApp/**",
|
|
"wwwroot/**",
|
|
"**/*.cjs",
|
|
"pnpm-lock.yaml",
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
parser: tseslint.parser,
|
|
parserOptions: {
|
|
ecmaVersion: 2023,
|
|
sourceType: "module",
|
|
project: "./tsconfig.json",
|
|
ecmaFeatures: { jsx: true },
|
|
},
|
|
},
|
|
plugins: {
|
|
"unused-imports": unusedImports,
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
"unused-imports/no-unused-imports": "error",
|
|
"unused-imports/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
vars: "all",
|
|
varsIgnorePattern: "^_",
|
|
args: "after-used",
|
|
argsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
"error",
|
|
{ prefer: "type-imports" },
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
},
|
|
},
|
|
];
|