-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
42 lines (39 loc) · 1.12 KB
/
eslint.config.js
File metadata and controls
42 lines (39 loc) · 1.12 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
// eslint.config.js
import tseslint from 'typescript-eslint';
import prettierPlugin from 'eslint-plugin-prettier';
/** @type {import("eslint").Linter.FlatConfig[]} */
export default [
// Recommended base config (no type-checking rules)
...tseslint.configs.recommended,
// You can add stricter type-checking rules later:
// ...tseslint.configs['recommended-requiring-type-checking'],
{
files: ['**/*.ts'],
plugins: {
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/member-ordering': [
'error',
{
default: [
'private-static-field',
'protected-static-field',
'public-static-field',
'private-instance-field',
'protected-instance-field',
'public-instance-field',
'constructor',
'private-static-method',
'protected-static-method',
'public-static-method',
'private-instance-method',
'protected-instance-method',
'public-instance-method',
],
},
],
},
},
];