mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix lint-api
This commit is contained in:
@@ -1,107 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [
|
||||
"@stylistic/ts",
|
||||
"@typescript-eslint",
|
||||
"jsdoc"
|
||||
],
|
||||
"rules": {
|
||||
"@stylistic/ts/indent": [
|
||||
"warn",
|
||||
2
|
||||
],
|
||||
"@stylistic/ts/semi": [
|
||||
"warn",
|
||||
"always"
|
||||
],
|
||||
"@stylistic/ts/quotes": [
|
||||
"warn",
|
||||
"single",
|
||||
{ "allowTemplateLiterals": true }
|
||||
],
|
||||
|
||||
"@typescript-eslint/array-type": [
|
||||
"warn",
|
||||
{
|
||||
"default": "array",
|
||||
"readonly": "generic"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"warn",
|
||||
{
|
||||
"allowExpressions": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
"warn",
|
||||
{
|
||||
"multiline": {
|
||||
"delimiter": "semi",
|
||||
"requireLast": true
|
||||
},
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"warn",
|
||||
{ "selector": "typeLike", "format": ["PascalCase"] },
|
||||
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
|
||||
],
|
||||
"@typescript-eslint/prefer-namespace-keyword": "warn",
|
||||
"@typescript-eslint/type-annotation-spacing": "warn",
|
||||
|
||||
"comma-dangle": [
|
||||
"warn",
|
||||
{
|
||||
"objects": "never",
|
||||
"arrays": "never",
|
||||
"functions": "never"
|
||||
}
|
||||
],
|
||||
"curly": [
|
||||
"warn",
|
||||
"multi-line"
|
||||
],
|
||||
"eol-last": "warn",
|
||||
"eqeqeq": [
|
||||
"warn",
|
||||
"always"
|
||||
],
|
||||
"jsdoc/check-alignment": 1,
|
||||
"jsdoc/check-param-names": 1,
|
||||
"keyword-spacing": "warn",
|
||||
"max-len": [
|
||||
"warn",
|
||||
{
|
||||
"code": 1000, // Don't enforce for code
|
||||
"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": ["-"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,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: ['-'] }]
|
||||
}
|
||||
}
|
||||
);
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
"posttest": "npm run lint",
|
||||
"lint": "eslint --max-warnings 0 src/ addons/",
|
||||
"lint-fix": "eslint --fix src/ addons/",
|
||||
"lint-api": "eslint --no-eslintrc -c .eslintrc.json.typings --max-warnings 0 --no-ignore --ext .d.ts typings/",
|
||||
"lint-api": "eslint --config eslint.config.typings.mjs --max-warnings 0 typings/",
|
||||
"test-unit": "node ./bin/test_unit.js",
|
||||
"test-unit-coverage": "node ./bin/test_unit.js --coverage",
|
||||
"test-unit-dev": "cross-env NODE_PATH='./out' mocha",
|
||||
|
||||
Vendored
+1
-1
@@ -1231,7 +1231,7 @@ declare module '@xterm/headless' {
|
||||
* @param id Specifies the function identifier under which the callback
|
||||
* gets registered, e.g. {intermediates: '%' final: 'G'} for
|
||||
* default charset selection.
|
||||
* @param callback The function to handle the sequence.
|
||||
* @param handler The function to handle the sequence.
|
||||
* Return true if the sequence was handled; false if we should try
|
||||
* a previous handler (set by addEscHandler or setEscHandler).
|
||||
* The most recently added handler is tried first.
|
||||
|
||||
Vendored
+1
-1
@@ -1830,7 +1830,7 @@ declare module '@xterm/xterm' {
|
||||
* @param id Specifies the function identifier under which the callback gets
|
||||
* registered, e.g. {intermediates: '%' final: 'G'} for default charset
|
||||
* selection.
|
||||
* @param callback The function to handle the sequence.
|
||||
* @param handler The function to handle the sequence.
|
||||
* Return `true` if the sequence was handled, `false` if the parser should
|
||||
* try a previous handler. The most recently added handler is tried first.
|
||||
* @returns An IDisposable you can call to remove this handler.
|
||||
|
||||
Reference in New Issue
Block a user