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

feat(eslint-plugin): Migrate plugin to ts #120

Merged
merged 97 commits into from Feb 11, 2019
Merged

Conversation

bradzacher
Copy link
Member

@bradzacher bradzacher commented Jan 22, 2019

Migrates eslint-plugin to typescript.
There's a big refactor in here to make creating a rule easier / more standardised.

  • Types are a lot stricter:
    • Rule meta must use messageId.
    • Rule meta must include docs.
      • Docs must include category, description, and recommended.
  • Reduced boilerplate:

Build is passing across the board.

  • Note that the packages will now include .js.map and .d.ts.map files.

Tests have been largely untouched apart from the rename, and they are all passing.

closes #47
closes #40

Waiting for the following PRs to be merged in to master:
#178, #192, #204, #215, #231

Closed waiting PRs
#155, #194, #199, #206, #222, #226, #232

@bradzacher bradzacher added the DO NOT MERGE PRs which should not be merged yet label Jan 22, 2019
@bradzacher bradzacher self-assigned this Jan 22, 2019
tsconfig.json Outdated Show resolved Hide resolved
armano2
armano2 previously approved these changes Feb 7, 2019
# Conflicts:
#	packages/eslint-plugin/lib/rules/adjacent-overload-signatures.js
#	packages/eslint-plugin/lib/util.js
#	packages/eslint-plugin/package.json
#	packages/parser/src/eslint-scope.d.ts
#	packages/parser/src/parser.ts
#	packages/parser/src/typings.d.ts
#	packages/parser/typings/eslint-scope.d.ts
#	packages/typescript-estree/package.json
#	packages/typescript-estree/src/node-utils.ts
#	packages/typescript-estree/src/parser.ts
@bradzacher bradzacher added the blocked by another PR PRs which are ready to go but waiting on another PR label Feb 7, 2019
# Conflicts:
#	packages/eslint-plugin/lib/rules/no-unnecessary-type-assertion.js
@armano2
Copy link
Member

armano2 commented Feb 10, 2019

Can we split this PR to few smaller one and merge them one by one?

  1. add typecheck for tests (new tsconfig.json configs)
  2. add new types and export them to from parser
  3. changes to rules and type definition for plugin

right now this PR is getting bigger and bigger and its really hard to review and check if there is no actual issues

@armano2
Copy link
Member

armano2 commented Feb 10, 2019

can you update analyze-scope.ts,

- TSEmptyBodyFunctionExpression(node: TSESTree.FunctionExpression): void
+ TSEmptyBodyFunctionExpression(node: TSESTree.TSEmptyBodyFunctionExpression): void

@JamesHenry JamesHenry removed the blocked by another PR PRs which are ready to go but waiting on another PR label Feb 11, 2019
@JamesHenry JamesHenry merged commit 61c60dc into master Feb 11, 2019
@bradzacher bradzacher deleted the migrate-plugin-to-ts branch February 11, 2019 02:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting rules to be in TypeScript Provide documentation for writing eslint rules in typescript
6 participants