Skip to content

Conversation

@JoshuaKGoldberg
Copy link
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 5, 2023

Overview

Ref: microsoft/TypeScript#51825

Enables @typescript-eslint/prefer-namespace-keyword in this repo. The steps I took were pretty straightforward:

  1. Replaced the rules object in .eslintrc.cjs with { '@typescript-eslint/prefer-namespace-keyword': 'error' }
  2. Replaced eslint- in comments with JOSH_IGNORE_- (so that ESLint wouldn't error on missing rules)
  3. Ran npx eslint "./types/**/*.ts" "./types/**/*.tsx" --fix
  4. Undid the JOSH_IGNORE_- replacements
  5. Reset .eslintrc.cjs back to master, then added the '@typescript-eslint/prefer-namespace-keyword': 'error' at the end of rules

Copy link
Collaborator

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT left a comment

Choose a reason for hiding this comment

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

signing off for office-js and office-js-preview - our downstream processes and documentation aren't adversely affected

peterblazejewicz added a commit to peterblazejewicz/DefinitelyTyped that referenced this pull request Aug 12, 2023
…yped#66292

This is technical removal. In DefinitelyTyped#66292 there is an effort to update DT for
upcoming TS language changes (see linked PR for details) and updating
this specifc DT package (@hapi/nes) to pass checks againsts current
status of TS language would prove fruitless. The upstream JS package
already progressed and DT types are out of sync with current module.
One could just revert this PR, in case of change to @hapi/nes types is
to be done in future.

Thank you for your understanding!
weswigham pushed a commit that referenced this pull request Aug 15, 2023
)

This is technical removal. In #66292 there is an effort to update DT for
upcoming TS language changes (see linked PR for details) and updating
this specifc DT package (@hapi/nes) to pass checks againsts current
status of TS language would prove fruitless. The upstream JS package
already progressed and DT types are out of sync with current module.
One could just revert this PR, in case of change to @hapi/nes types is
to be done in future.

Thank you for your understanding!
@DangerBotOSS
Copy link

DangerBotOSS commented Aug 20, 2023

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

db.js (unpkg)

was missing the following properties:

  1. version

doctrine (unpkg)

was missing the following properties:

  1. Error

lokijs (unpkg)

was missing the following properties:

  1. deepFreeze
  2. freeze
  3. unFreeze
  4. Resultset
  5. Comparators

murmurhash3js (unpkg)

was missing the following properties:

  1. version

nes (unpkg)

was missing the following properties:

  1. plugin

node-hue-api (unpkg)

was missing the following properties:

  1. BridgeApi
  2. api
  3. connect
  4. scheduledEvent
  5. scene
as well as these 3 other properties...

timer, locateBridges, searchForBridges

precise (unpkg)

was missing the following properties:

  1. precise

revalidator (unpkg)

was missing the following properties:

  1. mixin

simple-url-cache (unpkg)

was missing the following properties:

  1. The declaration doesn't match the JavaScript module 'simple-url-cache'. Reason:
    The JavaScript module can be called or constructed, but the declaration module cannot.

The most common way to resolve this error is to use 'export =' syntax.
To learn more about 'export =' syntax, see https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require.

  1. pool
  2. locks
  3. helpers
  4. StorageInstance
as well as these 1 other properties...

RedisPool

swiz (unpkg)

was missing the following properties:

  1. help
  2. check
  3. checkPartial

Generated by 🚫 dangerJS against df30a59

## The history of Definitely Typed

Definitely Typed is one of the most active repositories on GitHub. You might have wondered how the project came to be. A history of Definitely Typed exists, that was put together by @johnnyreilly. It tells the story of the early days of Definitely Typed, from a repository created by @borisyankov, to the point where it became a pivotal part of the TypeScript ecosystem. [You can read the story of Definitely Typed here](https://johnnyreilly.com/definitely-typed-the-movie).
Definitely Typed is one of the most active repositories on GitHub. You might have wondered how the project came to be. A history of Definitely Typed exists, that was put together by @johnnyreilly. It tells the story of the early days of Definitely Typed, from a repository created by @borisyankov, to the point where it became a pivotal part of the TypeScript ecosystem. [You can read the story of Definitely Typed here](https://johnnyreilly.com/definitely-typed-the-movie).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not an intentional part of this PR, but I like the change. 😄

.eslintrc.cjs Outdated
'ts-check': false,
}
],
'@typescript-eslint/prefer-namespace-keyword': 'error',
Copy link
Contributor

Choose a reason for hiding this comment

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

this change now needs to be made on the microsoft/definitelytyped-tools repo in the eslint-plugin package.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

afharo pushed a commit to afharo/DefinitelyTyped that referenced this pull request Aug 24, 2023
…yped#66292 (DefinitelyTyped#66372)

This is technical removal. In DefinitelyTyped#66292 there is an effort to update DT for
upcoming TS language changes (see linked PR for details) and updating
this specifc DT package (@hapi/nes) to pass checks againsts current
status of TS language would prove fruitless. The upstream JS package
already progressed and DT types are out of sync with current module.
One could just revert this PR, in case of change to @hapi/nes types is
to be done in future.

Thank you for your understanding!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants