forked from xtermjs/xterm.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.typings.mjs
More file actions
56 lines (53 loc) · 1.93 KB
/
eslint.config.typings.mjs
File metadata and controls
56 lines (53 loc) · 1.93 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
51
52
53
54
55
56
// @ts-check
import stylistic from '@stylistic/eslint-plugin';
import jsdoc from 'eslint-plugin-jsdoc';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
files: ['typings/**/*.d.ts'],
plugins: {
'@stylistic': stylistic,
'@typescript-eslint': tseslint.plugin,
jsdoc
},
languageOptions: {
parser: tseslint.parser
},
rules: {
'@stylistic/indent': ['warn', 2],
'@stylistic/semi': ['warn', 'always'],
'@stylistic/quotes': ['warn', 'single', { allowTemplateLiterals: true }],
'@stylistic/member-delimiter-style': ['warn', {
multiline: { delimiter: 'semi', requireLast: true },
singleline: { delimiter: 'comma', requireLast: false }
}],
'@stylistic/type-annotation-spacing': 'warn',
'@typescript-eslint/array-type': ['warn', { default: 'array', readonly: 'generic' }],
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
'@typescript-eslint/naming-convention': [
'warn',
{ selector: 'typeLike', format: ['PascalCase'] },
{ selector: 'interface', format: ['PascalCase'], prefix: ['I'] }
],
'@typescript-eslint/prefer-namespace-keyword': 'warn',
'comma-dangle': ['warn', { objects: 'never', arrays: 'never', functions: 'never' }],
'curly': ['warn', 'multi-line'],
'eol-last': 'warn',
'eqeqeq': ['warn', 'always'],
'jsdoc/check-alignment': 'warn',
'jsdoc/check-param-names': 'warn',
'keyword-spacing': 'warn',
'max-len': ['warn', {
code: 1000,
comments: 80,
ignoreUrls: true,
ignorePattern: '^ *(?<ps_description>\\* Ps=)'
}],
'no-extra-semi': 'error',
'no-irregular-whitespace': 'warn',
'no-trailing-spaces': 'warn',
'object-curly-spacing': ['warn', 'always'],
'spaced-comment': ['warn', 'always', { markers: ['/'], exceptions: ['-'] }]
}
}
);