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 97 commits into from Feb 11, 2019


None yet
6 participants
Copy link

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:
    • Automatically adds url to the meta.
    • Automatically merges default options for a rule
    • Once Microsoft/TypeScript#26349 is merged, the generic typing will only require the TOptions type.
      • Maybe we can look at auto-generating the JSONSchema in future based on the interface type?

Build is passing across the board.

  • Note that the packages will now include and 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 added some commits Jan 21, 2019

@bradzacher bradzacher self-assigned this Jan 22, 2019

Show resolved Hide resolved tsconfig.json Outdated

bradzacher and others added some commits Jan 22, 2019

Merge master into migrate-plugin-to-ts
# Conflicts:
#	packages/eslint-plugin/lib/util.js
#	packages/eslint-plugin/src/lib/rules/no-object-literal-type-assertion.ts

bradzacher added some commits Feb 7, 2019

Merge branch 'master' into migrate-plugin-to-ts
# 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 added some commits Feb 9, 2019

Merge branch 'master' into migrate-plugin-to-ts
# Conflicts:
#	packages/eslint-plugin/lib/rules/no-unnecessary-type-assertion.js

This comment has been minimized.

Copy link

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

@bradzacher bradzacher force-pushed the migrate-plugin-to-ts branch from 7404717 to 917a9f1 Feb 10, 2019


This comment has been minimized.

Copy link

armano2 commented Feb 10, 2019

can you update analyze-scope.ts,

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

bradzacher added some commits Feb 10, 2019

@JamesHenry JamesHenry merged commit 61c60dc into master Feb 11, 2019

2 of 3 checks passed

codecov/project 94.53% (-2.31%) compared to 5e3e285
Semantic Pull Request ready to be squashed
codecov/patch 90.23% of diff hit (target 90%)

@bradzacher bradzacher deleted the migrate-plugin-to-ts branch Feb 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment