1 |
|
2 |
|
3 |
|
4 |
|
5 | const path = require('path');
|
6 | const rulesDirPlugin = require('eslint-plugin-rulesdir');
|
7 | rulesDirPlugin.RULES_DIR = path.join(__dirname, '..', 'scripts', 'eslint_rules', 'lib');
|
8 |
|
9 | module.exports = {
|
10 | 'overrides': [{
|
11 | 'files': ['*.ts'],
|
12 | 'rules': {
|
13 | '@typescript-eslint/naming-convention': [
|
14 | 'error', {
|
15 | 'selector': ['function', 'variable', 'accessor', 'method', 'property', 'parameterProperty'],
|
16 | 'format': ['camelCase'],
|
17 | },
|
18 | {
|
19 |
|
20 | 'selector': 'variable',
|
21 | 'modifiers': ['const'],
|
22 | 'format': ['camelCase', 'UPPER_CASE'],
|
23 | },
|
24 | {
|
25 | 'selector': 'classProperty',
|
26 | 'modifiers': ['static', 'readonly'],
|
27 | 'format': ['UPPER_CASE'],
|
28 | },
|
29 | {
|
30 | 'selector': 'enumMember',
|
31 | 'format': ['PascalCase', 'UPPER_CASE'],
|
32 | },
|
33 | {
|
34 | 'selector': ['typeLike'],
|
35 | 'format': ['PascalCase'],
|
36 | },
|
37 | {
|
38 | 'selector': 'parameter',
|
39 | 'format': ['camelCase'],
|
40 | 'leadingUnderscore': 'allow',
|
41 | }
|
42 | ]
|
43 | }
|
44 | }]
|
45 | };
|