-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.cjs
More file actions
47 lines (46 loc) · 1.22 KB
/
eslint.config.cjs
File metadata and controls
47 lines (46 loc) · 1.22 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
41
42
43
44
45
46
47
/*
* Consolidated flat ESLint config for the monorepo (ESLint v9+)
* - TypeScript strict rules
* - Prettier compatibility
* - Minimal custom rules
*/
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');
/** @type {import('eslint').Linter.FlatConfig[]} */
module.exports = [
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/coverage/**',
'.turbo/**',
'packages/**/dist/**',
'**/*.d.ts'
],
},
{
files: ['**/*.{ts,tsx,js,cjs,mjs}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
projectService: true,
tsconfigRootDir: __dirname,
// NOTE: @typescript-eslint currently warns for TS 5.9; keep until plugin updates.
},
},
plugins: { '@typescript-eslint': tsPlugin },
rules: {
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-ignore': 'allow-with-description', minimumDescriptionLength: 10 },
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
],
},
},
];