Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ESLint config for TypeScript files #40584

Open
wants to merge 12 commits into
base: trunk
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Fixed ESLint warning


Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Annotation } from '.';

import './style-annotation.scss';

// eslint-disable-next-line jsdoc/require-returns
/**
* Custom tooltips plugin for uPlot.
*
Expand Down
12 changes: 12 additions & 0 deletions tools/js-tools/eslintrc/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,18 @@ export default function makeBaseConfig( configurl, opts = {} ) {
'error',
{ allowInterfaces: 'with-single-extends' },
],
// Disable param name check for destructured params.
'jsdoc/check-param-names': [ 'error', { checkDestructured: false } ],
manzoorwanijk marked this conversation as resolved.
Show resolved Hide resolved
// TS should be enough to catch undefined types.
'jsdoc/no-undefined-types': 'warn',
manzoorwanijk marked this conversation as resolved.
Show resolved Hide resolved
// Disable param check except when destructured.
'jsdoc/require-param': [ 'error', { checkDestructured: false } ],
manzoorwanijk marked this conversation as resolved.
Show resolved Hide resolved
// TS should mostly have the type set.
'jsdoc/require-param-type': 'off',
'jsdoc/require-property-type': 'off',
// Let us use TS return type for better inference
'jsdoc/require-returns': 'off',
manzoorwanijk marked this conversation as resolved.
Show resolved Hide resolved
'jsdoc/require-returns-type': 'off',
},
} ),
// Jest.
Expand Down
Loading