Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['@typescript-eslint', 'jsdoc'],
rules: {
'dt-header': 'error',
'export-just-namespace': 'error',
'jsdoc/check-tag-names': [
'error',
{
// TODO: Some (but not all) of these tags should likely be removed from this list.
// Additionally, some may need to be contributed to eslint-plugin-jsdoc.
definedTags: [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a list of tags that are used on DT and explicitly allowed, or is it the opposite: tags that are explicitly disallowed (and used to be on DT)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'addVersion',
'api',
'author',
'beta',
'brief',
'category',
'cfg',
'chainable',
'check',
'classDescription',
'condparamprivilege',
'constraint',
'credits',
'declaration',
'defApiFeature',
'defaultValue',
'detail',
'end',
'eventproperty',
'experimental',
'export',
'expose',
'extendscript',
'factory',
'field',
'final',
'fixme',
'fluent',
'for',
'governance',
'header',
'hidden-property',
'hidden',
'id',
'jsx',
'label',
'language',
'legacy',
'link',
'listen',
'locus',
'methodOf',
'minVersion',
'ngdoc',
'nonstandard',
'note',
'npm',
'observable',
'option',
'optionobject',
'options',
'packageDocumentation',
'param',
'parent',
'platform',
'plugin',
'preserve',
'privateRemarks',
'privilegeLevel',
'privilegeName',
'proposed',
'range',
'readOnly',
'related',
'remark',
'remarks',
'required',
'requires',
'restriction',
'returnType',
'section',
'see',
'since',
'const',
'singleton',
'source',
'struct',
'suppress',
'targetfolder',
'enum',
'title',
'record',
'title',
'TODO',
'trigger',
'triggers',
'typeparam',
'typeParam',
'unsupported',
'url',
'usage',
'warn',
'warning',
'version',
],
typed: true,
},
],
'no-any-union': 'error',
'no-bad-reference': 'error',
'no-const-enum': 'error',
'no-dead-reference': 'error',
'no-declare-current-package': 'error',
'no-import-default-of-export-equals': 'error',
'no-outside-dependencies': 'error',
'no-self-import': 'error',
'no-single-element-tuple-type': 'error',
'no-unnecessary-generics': 'error',
'no-useless-files': 'error',
'prefer-declare-function': 'error',
'redundant-undefined': 'error',
'trim-file': 'error',
},
settings: {
jsdoc: {
tagNamePreference: {
argument: 'argument',
exception: 'exception',
function: 'function',
method: 'method',
param: 'param',
return: 'return',
returns: 'returns',
},
},
},
};
31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"d3-time": "^3.0.0",
"d3-time-format": "^4.0.0",
"danger": "^11.2.3",
"eslint-plugin-jsdoc": "^44.0.1",
"eslint-plugin-jsdoc": "^44.2.7",
"jsdom": "^17.0.0",
"prettier": "^2.1.1",
"remark-cli": "^11.0.0",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "@definitelytyped/dtslint/dt.json" }
2 changes: 1 addition & 1 deletion types/ember/test/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
const assert: typeof Ember.assert = Ember.assert;

/**
* @ember/debug tests
* `@ember/debug` tests
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending gajus/eslint-plugin-jsdoc#1116, this seemed like the most straightforward resolution.

*/
// @ts-expect-error
runInDebug();
Expand Down
2 changes: 1 addition & 1 deletion types/ember/v3/test/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
const assert: typeof Ember.assert = Ember.assert;

/**
* @ember/debug tests
* `@ember/debug` tests
*/
// @ts-expect-error
runInDebug();
Expand Down
2 changes: 1 addition & 1 deletion types/ember__debug/ember__debug-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@ember/debug';

/**
* @ember/debug tests
* `@ember/debug` tests
*/
// @ts-expect-error
runInDebug();
Expand Down
2 changes: 1 addition & 1 deletion types/ember__debug/v3/ember__debug-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@ember/debug';

/**
* @ember/debug tests
* `@ember/debug` tests
*/
// @ts-expect-error
runInDebug();
Expand Down
3 changes: 0 additions & 3 deletions types/gulp-help-doc/gulp-help-doc-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import usage = require('gulp-help-doc');

/**
* Demo task
*
* @task {demo}
* @arg {env} environment
*/
gulp.task('demo', function() {});

Expand Down
1 change: 1 addition & 0 deletions types/openfin/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"rules": {
"jsdoc/check-tag-names": "off",
"no-const-enum": "off",
"prefer-declare-function": "off",
"no-single-element-tuple-type": "off"
Expand Down
2 changes: 1 addition & 1 deletion types/openui5/sap.f.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ declare module "sap/f/library" {
Up = "Up",
}
/**
* @SINCE 1.104
* @since 1.104
*
* Enumeration for different SidePanel position.
*/
Expand Down
4 changes: 2 additions & 2 deletions types/openui5/sap.ui.mdc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare module "sap/ui/mdc/filterbar/PropertyHelper" {
import Metadata from "sap/ui/base/Metadata";

/**
* @SINCE 1.95
* @since 1.95
*
* Filter bar property helper provide a consistent and standardized view on properties and their attributes.
* Validates the given properties, sets default values, and provides utilities to work with these properties.
Expand Down Expand Up @@ -82,7 +82,7 @@ declare module "sap/ui/mdc/filterbar/PropertyHelper" {
*/
static getMetadata(): Metadata;
/**
* @PROTECTED - DO NOT USE IN APPLICATIONS (only for related classes in the framework)
* - DO NOT USE IN APPLICATIONS (only for related classes in the framework)
*
* Applies default values and resolves property references.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ProcessedColorValue} from '../StyleSheet/processColor';
import {ColorValue} from '../StyleSheet/StyleSheet';

/**
* @see: https://reactnative.dev/docs/actionsheetios#content
* @see https://reactnative.dev/docs/actionsheetios#content
*/
export interface ActionSheetIOSOptions {
title?: string | undefined;
Expand Down
2 changes: 0 additions & 2 deletions types/react-native/v0.71/Libraries/ReactNative/RootTag.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/

import type * as React from 'react';
Expand Down
2 changes: 0 additions & 2 deletions types/react-native/v0.71/Libraries/TurboModule/RCTExport.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/

export interface TurboModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

// Renderers that don't support test selectors
Expand Down
4 changes: 2 additions & 2 deletions types/subset-font/subset-font-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import subsetFont = require('subset-font');
const sameFormatBuffer = await subsetFont(mySfntFontBuffer, '1234');

// No options provided, should error
/** @ts-expect-error */
// @ts-expect-error
const noCharsProvidedError = await subsetFont(mySfntFontBuffer);

// Invalid target format provided, should error
const invalidTargetFormatError = await subsetFont(mySfntFontBuffer, '1234', {
/** @ts-expect-error */
// @ts-expect-error
targetFormat: 'eot',
});
})();