Files
lore/eslint.config.mjs
T
naomi 6bbcb4d8fa
Node.js CI / CI (pull_request) Successful in 32s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 53s
feat: linter and tests work now
2025-12-27 12:42:17 -08:00

47 lines
1.4 KiB
JavaScript

import NaomisConfig from "@nhcarrigan/eslint-config";
const srcRules = NaomisConfig.find((rule) => rule.files?.includes("src/**/*.ts"));
const testRules = NaomisConfig.find((rule) => rule.files?.includes("test/**/*.spec.ts"));
export default [
...NaomisConfig,
{
files: ["src/**/*.ts"],
languageOptions: {
parserOptions: {
project: "./tsconfig.app.json"
}
},
plugins: {
...srcRules?.plugins,
},
rules: {
...srcRules?.rules,
"new-cap": "off",
// This causes a circular fix error?
"stylistic/no-multi-spaces": "off",
// This must be off because this is not a module.
"import/extensions": "off",
// This is a web app
"no-console": "off",
}
},
{
files: ["src/**/*.spec.ts"],
languageOptions: {
parserOptions: {
project: "./tsconfig.spec.json"
}
},
plugins: {
...testRules?.plugins,
},
rules: {
...testRules?.rules,
// This must be off because this is not a module.
"import/extensions": "off",
// We turn this off because the test bed has weak types.
"@typescript-eslint/consistent-type-assertions": "off",
}
}
]