Replace the primary lint pipeline with oxlint and oxlint-tsgolint for type-aware TypeScript rules, preserving existing rule behavior from eslint.config.mjs via @oxlint/migrate and targeted jsPlugins (@stylistic/eslint-plugin, eslint-plugin-jsdoc as jsdoc-js, oxlint-plugin-eslint for no-restricted-syntax and object-curly-spacing). Keep a hybrid ESLint pass (eslint.config.naming.mjs) only for @typescript-eslint/naming-convention until tsgolint implements it (oxc-project/tsgolint#186). Legacy eslint.config.mjs and eslint.config.typings.mjs remain for reference but are no longer used by npm scripts. Add .oxlintrc.json for src/addons/demo/test and .oxlintrc.typings.json for typings/ (syntax-only, no --type-aware). Update lint, lint-fix, lint-api, and lint-changes to run oxlint first, then naming ESLint. Platform binaries install via oxlint-tsgolint optionalDependencies on Linux, macOS, and Windows. Fixes https://github.com/xtermjs/xterm.js/issues/5690 Co-authored-by: Cursor <cursoragent@cursor.com>
121 lines
2.7 KiB
JSON
121 lines
2.7 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"options": {
|
|
"maxWarnings": 0
|
|
},
|
|
"env": {
|
|
"builtin": true
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"typings/**/*.d.ts"
|
|
],
|
|
"plugins": [
|
|
"typescript"
|
|
],
|
|
"jsPlugins": [
|
|
"@stylistic/eslint-plugin",
|
|
{
|
|
"name": "jsdoc-js",
|
|
"specifier": "eslint-plugin-jsdoc"
|
|
},
|
|
"oxlint-plugin-eslint"
|
|
],
|
|
"rules": {
|
|
"@stylistic/indent": [
|
|
"warn",
|
|
2
|
|
],
|
|
"@stylistic/semi": [
|
|
"warn",
|
|
"always"
|
|
],
|
|
"@stylistic/quotes": [
|
|
"warn",
|
|
"single",
|
|
{
|
|
"allowTemplateLiterals": "always"
|
|
}
|
|
],
|
|
"@stylistic/member-delimiter-style": [
|
|
"warn",
|
|
{
|
|
"multiline": {
|
|
"delimiter": "semi",
|
|
"requireLast": true
|
|
},
|
|
"singleline": {
|
|
"delimiter": "comma",
|
|
"requireLast": false
|
|
}
|
|
}
|
|
],
|
|
"@stylistic/type-annotation-spacing": "warn",
|
|
"@stylistic/keyword-spacing": "warn",
|
|
"@stylistic/max-len": [
|
|
"warn",
|
|
{
|
|
"code": 1000,
|
|
"comments": 80,
|
|
"ignoreUrls": true,
|
|
"ignorePattern": "^ *(?<ps_description>\\* Ps=)"
|
|
}
|
|
],
|
|
"@stylistic/no-extra-semi": "error",
|
|
"@stylistic/no-trailing-spaces": "warn",
|
|
"eslint-js/object-curly-spacing": [
|
|
"warn",
|
|
"always"
|
|
],
|
|
"@stylistic/spaced-comment": [
|
|
"warn",
|
|
"always",
|
|
{
|
|
"markers": [
|
|
"/"
|
|
],
|
|
"exceptions": [
|
|
"-"
|
|
]
|
|
}
|
|
],
|
|
"@stylistic/comma-dangle": [
|
|
"warn",
|
|
{
|
|
"objects": "never",
|
|
"arrays": "never",
|
|
"functions": "never"
|
|
}
|
|
],
|
|
"@stylistic/eol-last": "warn",
|
|
"curly": [
|
|
"warn",
|
|
"multi-line"
|
|
],
|
|
"eqeqeq": [
|
|
"warn",
|
|
"always"
|
|
],
|
|
"jsdoc-js/check-alignment": "warn",
|
|
"jsdoc-js/check-param-names": "warn",
|
|
"no-irregular-whitespace": "warn",
|
|
"typescript/array-type": [
|
|
"warn",
|
|
{
|
|
"default": "array",
|
|
"readonly": "generic"
|
|
}
|
|
],
|
|
"typescript/explicit-function-return-type": [
|
|
"warn",
|
|
{
|
|
"allowExpressions": true
|
|
}
|
|
],
|
|
"typescript/prefer-namespace-keyword": "warn"
|
|
}
|
|
}
|
|
]
|
|
}
|