-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
43 lines (39 loc) · 1.15 KB
/
eslint.config.js
File metadata and controls
43 lines (39 loc) · 1.15 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 tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const prettierPlugin = require('eslint-plugin-prettier');
const prettierConfig = require('eslint-config-prettier');
/**
* ESLint v9 flat config.
* Lints TypeScript sources in branches-api and functions.
*/
module.exports = [
{
ignores: ['**/node_modules/**', '**/dist/**', '**/coverage/**'],
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'commonjs',
},
plugins: {
'@typescript-eslint': tsPlugin,
prettier: prettierPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
...prettierConfig.rules,
// Prefer TS-aware unused-vars and allow underscore-prefixed unused params.
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
// Formatting is enforced via Prettier.
'prettier/prettier': 'error',
// Pragmatic for an interview task.
'@typescript-eslint/no-explicit-any': 'off',
},
},
];