-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
29 lines (28 loc) · 766 Bytes
/
Copy patheslint.config.js
File metadata and controls
29 lines (28 loc) · 766 Bytes
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
// ESLint v9+ flat config (CommonJS)
const tseslint = require('typescript-eslint');
const prettier = require('eslint-config-prettier');
const prettierPlugin = require('eslint-plugin-prettier');
module.exports = [
{
ignores: ['dist/**', 'coverage/**', 'node_modules/**', '.eslintrc.cjs', 'src/**/*.js'],
},
// Only apply TS rules to TS files
...tseslint.configs.recommended,
{
files: ['**/*.ts'],
plugins: { prettier: prettierPlugin },
rules: {
'prettier/prettier': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
},
},
// Allow CommonJS in this config file
{
files: ['eslint.config.js'],
rules: {
'no-undef': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
prettier,
];