-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.cjs
More file actions
43 lines (38 loc) · 1.28 KB
/
eslint.config.cjs
File metadata and controls
43 lines (38 loc) · 1.28 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
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const compat = new FlatCompat({
recommendedConfig: js.configs.recommended,
});
/** @type {import('eslint').Linter.FlatConfig[]} */
module.exports = [
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'),
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: require('@typescript-eslint/parser'),
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }],
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'prettier/prettier': 'off',
},
},
{
ignores: ['dist/', 'node_modules/', '**/*.test.ts', 'eslint.config.cjs'],
},
];