37 lines
956 B
JavaScript
37 lines
956 B
JavaScript
// ESLint config for TypeScript (ESLint v9+ flat config)
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
|
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
export default [
|
|
{
|
|
files: ['**/*.ts'],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: ['./server/tsconfig.json', './client/tsconfig.json'],
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
describe: 'readonly',
|
|
it: 'readonly',
|
|
expect: 'readonly',
|
|
beforeEach: 'readonly',
|
|
afterAll: 'readonly',
|
|
beforeAll: 'readonly',
|
|
process: 'readonly',
|
|
console: 'readonly',
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
},
|
|
rules: {
|
|
'no-unused-vars': 'error',
|
|
'no-undef': 'error',
|
|
'no-console': 'error',
|
|
'semi': ['error', 'always'],
|
|
'quotes': ['error', 'single'],
|
|
},
|
|
},
|
|
]; |