26 lines
841 B
JavaScript
26 lines
841 B
JavaScript
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
const base = require('./eslint.config.js');
|
|
|
|
const typeAwareLayer = {
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
parser: require('@typescript-eslint/parser'),
|
|
parserOptions: {
|
|
project: ['./tsconfig.eslint.json', './tsconfig.spec.json', './backend/tsconfig.json'],
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
'@typescript-eslint/no-misused-promises': ['warn', { checksVoidReturn: false }],
|
|
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
},
|
|
};
|
|
|
|
module.exports = [...base, typeAwareLayer];
|