Skip to content

Only apply TypeScript lint rules to .ts files#396

Merged
Gudahtt merged 3 commits intodevelopfrom
only-apply-typescript-lint-rules-to-typescript
Mar 16, 2021
Merged

Only apply TypeScript lint rules to .ts files#396
Gudahtt merged 3 commits intodevelopfrom
only-apply-typescript-lint-rules-to-typescript

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Mar 16, 2021

The TypeScript lint rules were being applied to all files covered by the linter, including JavaScript files. Surprisingly this hasn't been much of an issue (I guess most of them are compatible with JavaScript too?), but it became an obstacle when trying to re-enable the rule @typescript-eslint/no-shadow.

TypeScript lint rules are now only applied to TypeScript files.

A new dependency was required to ensure we could import TypeScript modules from JavaScript modules. We do this in one place at the moment, in the JavaScript tests for the ApprovalController. Apparently the ESLint import plugin doesn't know how to resolve TypeScript modules without a custom resolver. We hadn't encountered this problem previously because import/no-unresolved was disabled in our TypeScript ESLint config, so it didn't warn us about the dependency being unresolved.

The ecmaVersion was also updated to be 2018 for JavaScript files, to reflect the language features we currently rely upon (we use object spread in one place, which was introduced in ES2018).

@Gudahtt Gudahtt requested a review from a team as a code owner March 16, 2021 14:04
@Gudahtt Gudahtt force-pushed the only-apply-typescript-lint-rules-to-typescript branch from 8e1bf7f to 19b094b Compare March 16, 2021 14:08
brad-decker
brad-decker previously approved these changes Mar 16, 2021
The TypeScript lint rules were being applied to all files covered by
the linter, including JavaScript files. Surprisingly this hasn't been
much of an issue (I guess most of them are compatible with JavaScript
too?), but it became an obstacle when trying to re-enable the rule
`@typescript-eslint/no-shadow`.

TypeScript lint rules are now only applied to TypeScript files.

A new dependency was required to ensure we could import TypeScript
modules from JavaScript modules. We do this in one place at the moment,
in the JavaScript tests for the ApprovalController. Apparently the
ESLint `import` plugin doesn't know how to resolve TypeScript modules
without a custom resolver. We hadn't encountered this problem
previously because `import/no-unresolved` was disabled in our
TypeScript ESLint config, so it didn't warn us about the dependency
being unresolved.

The `ecmaVersion` was also updated to be 2018 for JavaScript files, to
reflect the language features we currently rely upon (we use object
spread in one place, which was introduced in ES2018).
@Gudahtt Gudahtt force-pushed the only-apply-typescript-lint-rules-to-typescript branch from 19b094b to 3ee0490 Compare March 16, 2021 19:16
@Gudahtt
Copy link
Copy Markdown
Member Author

Gudahtt commented Mar 16, 2021

This has been rebased to resolve conflcits

@Gudahtt Gudahtt merged commit 21deb40 into develop Mar 16, 2021
@Gudahtt Gudahtt deleted the only-apply-typescript-lint-rules-to-typescript branch March 16, 2021 22:36
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The TypeScript lint rules were being applied to all files covered by
the linter, including JavaScript files. Surprisingly this hasn't been
much of an issue (I guess most of them are compatible with JavaScript
too?), but it became an obstacle when trying to re-enable the rule
`@typescript-eslint/no-shadow`.

TypeScript lint rules are now only applied to TypeScript files.

A new dependency was required to ensure we could import TypeScript
modules from JavaScript modules. We do this in one place at the moment,
in the JavaScript tests for the ApprovalController. Apparently the
ESLint `import` plugin doesn't know how to resolve TypeScript modules
without a custom resolver. We hadn't encountered this problem
previously because `import/no-unresolved` was disabled in our
TypeScript ESLint config, so it didn't warn us about the dependency
being unresolved.

The `ecmaVersion` was also updated to be 2018 for JavaScript files, to
reflect the language features we currently rely upon (we use object
spread in one place, which was introduced in ES2018).
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The TypeScript lint rules were being applied to all files covered by
the linter, including JavaScript files. Surprisingly this hasn't been
much of an issue (I guess most of them are compatible with JavaScript
too?), but it became an obstacle when trying to re-enable the rule
`@typescript-eslint/no-shadow`.

TypeScript lint rules are now only applied to TypeScript files.

A new dependency was required to ensure we could import TypeScript
modules from JavaScript modules. We do this in one place at the moment,
in the JavaScript tests for the ApprovalController. Apparently the
ESLint `import` plugin doesn't know how to resolve TypeScript modules
without a custom resolver. We hadn't encountered this problem
previously because `import/no-unresolved` was disabled in our
TypeScript ESLint config, so it didn't warn us about the dependency
being unresolved.

The `ecmaVersion` was also updated to be 2018 for JavaScript files, to
reflect the language features we currently rely upon (we use object
spread in one place, which was introduced in ES2018).
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
Adds methods `wallet_requestExecutionPermissions` and
`wallet_revokeExecutionPermission`, as defined in this revision of the
EIP-7715 specification ethereum/ERCs#1098.

This supports Readable Permissions project, and is related to the
following PRs:
- MetaMask/smart-accounts-kit#60
- MetaMask/metamask-extension#35193

Note: workflows are failing due to existing problems, fixed by
MetaMask/eth-json-rpc-middleware#397
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
This is the release for version 17.1.0.

```
4e74bb9 feat: add RPC methods described in (revised) EIP-7715 (#396)
0a66477 Run compatibility test only in main branch. (#397)
```

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jeff Smale <6363749+jeffsmale90@users.noreply.github.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
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.

2 participants