Skip to content

Commit

Permalink
Merge pull request jaegertracing#359 from jaegertracing/ui-to-ts
Browse files Browse the repository at this point in the history
Convert from Flow to Typescript for Jaeger-UI
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
  • Loading branch information
tiffon committed Mar 26, 2019
2 parents f5b02ac + 91aff48 commit 3793f0d
Show file tree
Hide file tree
Showing 199 changed files with 2,747 additions and 2,808 deletions.
19 changes: 17 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,26 @@ module.exports = {
settings: {
'import/resolver': {
node: {
extensions: ['.js', 'json', '.ts', '.tsx'],
extensions: ['.js', 'json', '.tsx'],
},
},
},
extends: ['react-app', 'airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'],
extends: ['react-app', 'airbnb', 'prettier', 'prettier/react'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: '.',
},
plugins: ['@typescript-eslint'],
rules: {
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 1,
},
},
],
rules: {
/* general */
'arrow-parens': [1, 'as-needed'],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ npm-debug.log
.idea
yarn-error.log
lerna-debug.log
.eslintcache
9 changes: 4 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

### Dependencies (dev and otherwise)

#### `eslint-plugin-flowtype`

While, this project does not use [`flow`](https://flow.org/), this ESLint plugin is required because the configuration extends [`react-app`](https://github.com/facebook/create-react-app/blob/master/packages/eslint-config-react-app/package.json#L18), which requires this plugin.

#### `@typescript-eslint/eslint-plugin`

ESLint is being used to lint the repo, as a whole. Within `./packages/plexus` (for now), [`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin) is used to apply ESLint to TypeScript. This application is localized to plexus via configuring `./packages/plexus/.eslintrc.js` for TypeScript, which means the change in settings is only applied to subdirectories of `./packages/plexus`. This package works really well, but there are quite a few issues it doesn't catch. For that, we use the TypeScript compiler.
Expand Down Expand Up @@ -41,7 +45,6 @@ This is an amalgamation of linting scripts that run to make sure things are all-
* `prettier-lint`
* `tsc-lint`
* `eslint`
* `flow`
* `check-license`

#### `prepare`
Expand Down Expand Up @@ -72,10 +75,6 @@ Pretty basic.

Note: This configuration is extended by `./packages/plexus/.eslintrc.js`.

## `.flowconfig`

Being phased out.

## `.travis.yml`

Currently `./packages/plexus` doesn't have any tests... But, when it does, `.travis.yml` needs to be updated to send coverage info for all `./packages/*` to codecov.io. ([Ticket](https://github.com/jaegertracing/jaeger-ui/issues/340))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ git config --add alias.c "commit -s"

# Style guide

Prefer to use [flow](https://flow.org/) for new code.
Use [typescript](https://www.typescriptlang.org/) for new code. Check types via `yarn tsc-lint`.

We use [`prettier`](https://prettier.io/), an "opinionated" code formatter. It can be applied to both JavaScript and CSS source files via `yarn prettier`.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ yarn start
| ------------ | ------------------------------------------------------------------- |
| `yarn start` | Starts development server with hot reloading and api proxy. |
| `yarn test` | Run all the tests |
| `yarn lint` | Lint the project (eslint, prettier, flow) |
| `yarn lint` | Lint the project (eslint, prettier, typescript) |
| `yarn build` | Runs production build. Outputs files to `packages/jaeger-ui/build`. |

## Build
Expand Down
226 changes: 0 additions & 226 deletions flow-typed/npm/raven-js_v3.17.x.js

This file was deleted.

Loading

0 comments on commit 3793f0d

Please sign in to comment.