-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (36 loc) · 1.02 KB
/
Copy patheslint.config.js
File metadata and controls
40 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ESLint v9 flat config
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const jestPlugin = require('eslint-plugin-jest');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
module.exports = [
// Ignored paths (replaces .eslintignore)
{
ignores: ['node_modules', 'lib', 'coverage'],
},
// Bring in recommended rule sets via compat
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended'),
// Project-specific settings
{
files: ['**/*.{ts,js}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
jest: jestPlugin,
},
rules: {
// Add project-specific overrides here if needed
},
},
];