-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
50 lines (44 loc) · 1.44 KB
/
eslint.config.js
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
48
49
const baseConfig = require('@enonic/eslint-config');
const { plugin: tsPlugin } = require('typescript-eslint');
const globals = require('globals');
module.exports = [
...baseConfig, // This includes the extended configuration from @enonic/eslint-config
{
files: ["**/*.ts", "**/*.tsx"], // Apply rules to TypeScript files
languageOptions: {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
globals: {
...globals.browser,
...globals.es6,
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
'new-cap': ['warn', {'capIsNewExceptions': ['Q']}],
// === CUSTOM RULES ===
// '@typescript-eslint/explicit-function-return-type': ['error', {allowExpressions: true}],
'@typescript-eslint/explicit-function-return-type': ['off'],
// 'comma-dangle': ['error', 'always-multiline'],
'comma-dangle': ['off'],
// '@typescript-eslint/member-ordering': ['error'],
'@typescript-eslint/member-ordering': ['off'],
},
},
{
ignores: [
"**/node_modules/",
"**/build/",
"**/dist/",
"**/testing/",
"**/.xp/",
"**/*.js",
"**/*.d.ts",
"**/spec/**/*",
]
}
];