Files
lore/eslint.config.mjs
naomi 0b5b4eadb9
Node.js CI / CI (push) Successful in 40s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m29s
feat: new site (#1)
### Explanation

_No response_

### Issue

_No response_

### Attestations

- [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/)
- [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/).
- [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/).

### Dependencies

- [ ] I have pinned the dependencies to a specific patch version.

### Style

- [ ] I have run the linter and resolved any errors.
- [ ] My pull request uses an appropriate title, matching the conventional commit standards.
- [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request.

### Tests

- [ ] My contribution adds new code, and I have added tests to cover it.
- [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes.
- [ ] All new and existing tests pass locally with my changes.
- [ ] Code coverage remains at or above the configured threshold.

### Documentation

_No response_

### Versioning

_No response_

Reviewed-on: #1
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
2025-12-28 04:54:35 +01:00

52 lines
1.7 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": [ "error", "never" ],
// This is a web app
"no-console": "off",
// Sometimes a component class will be empty. Not all components require logic.
"@typescript-eslint/no-extraneous-class": "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",
// This one allows us to define test globals.
"@typescript-eslint/init-declarations": "off",
"max-lines-per-function": "off"
}
}
]