mirror of
https://github.com/acamarata/nrel-spa.git
synced 2026-06-30 19:04:25 +00:00
- Add @typescript-eslint/parser and @typescript-eslint/eslint-plugin as direct devDependencies (were only peer deps of @acamarata/eslint-config, causing ERR_MODULE_NOT_FOUND in CI) - Add files: ['**/*.ts'] to eslint.config.mjs so ESLint 10 flat config picks up TypeScript files; add parserOptions.project for type-aware rules - Run prettier --write src/ to fix formatting after config changes - Add coverage/ to .gitignore and untrack previously committed coverage files
33 lines
869 B
JavaScript
33 lines
869 B
JavaScript
import tsParser from '@typescript-eslint/parser';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
import { typescript } from '@acamarata/eslint-config';
|
|
|
|
export default [
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
plugins: { '@typescript-eslint': tsPlugin },
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
},
|
|
},
|
|
},
|
|
...typescript.map((c) => ({
|
|
...c,
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
languageOptions: {
|
|
...(c.languageOptions ?? {}),
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
...((c.languageOptions ?? {}).parserOptions ?? {}),
|
|
project: './tsconfig.json',
|
|
},
|
|
},
|
|
})),
|
|
eslintConfigPrettier,
|
|
{
|
|
ignores: ['dist/', 'node_modules/', 'test.mjs', 'test-cjs.cjs', 'lib/'],
|
|
},
|
|
];
|