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

Enable TypeScript Rules (without requiring type checking rules) #18

Merged
merged 10 commits into from Mar 12, 2021
Merged

Enable TypeScript Rules (without requiring type checking rules) #18

merged 10 commits into from Mar 12, 2021

Conversation

rajsite
Copy link
Member

@rajsite rajsite commented Jan 20, 2021

The goal of this PR is to be used for evaluating the TypeScript Rules used in typescript.js.

To test locally, you can add the devDependencies to a project with:

npm install -D @typescript-eslint/eslint-plugin@4.9.1 eslint@7.6.0 eslint-plugin-import@2.22.0

And extract the tgz from the npm package build artifact (see below) and run:

npm install -D ni-eslint-config-1.0.0-alpha.11.tgz

This PR also makes a few additional changes:

  • Adds a tool usable via npm run dev-print-typescript-props to print the properties expected in each of the TypeScript configurations based on the installed typescript-eslint version. This helps in maintenance of tracking changes to the typescript-extension rules.
  • Adds basic smoke tests for the typescript and typescript-requiring-type-checking configurations
  • Adds the typescript-requiring-type-checking rules (the rules themselves are not target for discussion in this PR and are currently commented out).
  • TypeScript Extension rules were separated into different files and split by those rules requiring type checking and those that don't. In addition they were synced with the current NI configuration / Airbnb configuration that defines them for eslint.

Build artifacts:

typescript.js Show resolved Hide resolved
lib/typescript-extensions.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
lib/typescript-extensions.js Outdated Show resolved Hide resolved
lib/typescript-extensions.js Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
@mure
Copy link
Collaborator

mure commented Feb 4, 2021

If anyone else is doing this on a Mac, note that the built-in Archive Utility seems to try to recursively unpackage files. So I was very confused as to where ni-eslint-config-1.0.0-alpha.11.tgz was, but it turns out the utility was automatically unpacking that as well.

typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Show resolved Hide resolved
typescript.js Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
typescript.js Outdated Show resolved Hide resolved
@rajsite
Copy link
Member Author

rajsite commented Mar 12, 2021

@mure I'll go ahead and merge this since we have most reviewers. If you have feedback we can address it in a follow-up PR.

@rajsite rajsite merged commit c2b4541 into ni:master Mar 12, 2021
@rajsite rajsite deleted the typescript-all branch March 12, 2021 16:40
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.

None yet

6 participants