-
Notifications
You must be signed in to change notification settings - Fork 655
/
Copy patheslint.config.js
42 lines (38 loc) · 1.03 KB
/
eslint.config.js
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
41
// @ts-check
// Import required modules using CommonJS require syntax
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const path = require('path');
// Setup FlatCompat for backward compatibility with .eslintrc.* format
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
// Create the ESLint 9.x flat config
module.exports = [
js.configs.recommended,
...compat.extends(
'plugin:@typescript-eslint/recommended'
),
{
// Global linting settings
languageOptions: {
parser: require('@typescript-eslint/parser'),
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
'prettier': require('eslint-plugin-prettier'),
},
rules: {
'prettier/prettier': 'error',
},
},
{
// Files to ignore
ignores: ['**/node_modules/**', '**/dist/**', '**/.nx/**', '**/coverage/**'],
},
];