Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
50 lines (47 loc) · 1.49 KB
/
Copy patheslint.config.js
File metadata and controls
50 lines (47 loc) · 1.49 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
44
45
46
47
48
49
50
const {defineConfig, globalIgnores} = require('eslint/config'),
xhEslintConfig = require('@xh/eslint-config'),
tsdocEslint = require('eslint-plugin-tsdoc'),
prettier = require('eslint-config-prettier'),
globals = require('globals');
module.exports = defineConfig([
{
plugins: {tsdoc: tsdocEslint},
extends: [xhEslintConfig, prettier],
rules: {
'tsdoc/syntax': 'warn'
}
},
// Mark type-only imports and exports, so a build that compiles one file at a time erases them.
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
disallowTypeAnnotations: true
}
],
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error'
}
},
// Repo automation scripts run under Node, not in the browser.
{
files: ['.github/scripts/**/*.mjs', 'scripts/**/*'],
languageOptions: {
globals: globals.node
}
},
globalIgnores([
'.vitest/**/*',
'build/**/*',
'node_modules/**/*',
'bin/**/*',
'docs/codemod/**/*',
'docs/planning/**/*',
'kit/golden-layout/impl/**/*',
'public/msal-redirect-bridge.min.js'
])
]);