Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 5, 2019
1 parent 049ff59 commit 72f19e5
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 60 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.js
Expand Up @@ -15,6 +15,19 @@ module.exports = {
'prettier/flowtype',
],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{argsIgnorePattern: '^_'},
],
'import/order': 'error',
'no-unused-vars': 'off',
},
},
// to make it more suitable for running on code examples in docs/ folder
{
files: ['*.md'],
Expand Down Expand Up @@ -122,6 +135,7 @@ module.exports = {
'^types/(.*)': './types/$1',
},
},
'eslint-import-resolver-typescript': true,
},
},
};
108 changes: 54 additions & 54 deletions e2e/__tests__/__snapshots__/coverageRemapping.test.js.snap
Expand Up @@ -27,32 +27,32 @@ Object {
"loc": Object {
"end": Object {
"column": 35,
"line": 4,
"line": 6,
},
"start": Object {
"column": 34,
"line": 4,
"line": 6,
},
},
"locations": Array [
Object {
"end": Object {
"column": 35,
"line": 4,
"line": 6,
},
"start": Object {
"column": 34,
"line": 4,
"line": 6,
},
},
Object {
"end": Object {
"column": 39,
"line": 4,
"line": 6,
},
"start": Object {
"column": 38,
"line": 4,
"line": 6,
},
},
],
Expand All @@ -62,32 +62,32 @@ Object {
"loc": Object {
"end": Object {
"column": 35,
"line": 5,
"line": 7,
},
"start": Object {
"column": 34,
"line": 5,
"line": 7,
},
},
"locations": Array [
Object {
"end": Object {
"column": 35,
"line": 5,
"line": 7,
},
"start": Object {
"column": 34,
"line": 5,
"line": 7,
},
},
Object {
"end": Object {
"column": 39,
"line": 5,
"line": 7,
},
"start": Object {
"column": 38,
"line": 5,
"line": 7,
},
},
],
Expand All @@ -97,42 +97,42 @@ Object {
"loc": Object {
"end": Object {
"column": 31,
"line": 6,
"line": 8,
},
"start": Object {
"column": 27,
"line": 6,
"line": 8,
},
},
"locations": Array [
Object {
"end": Object {
"column": 31,
"line": 6,
"line": 8,
},
"start": Object {
"column": 27,
"line": 6,
"line": 8,
},
},
Object {
"end": Object {
"column": 39,
"line": 6,
"line": 8,
},
"start": Object {
"column": 35,
"line": 6,
"line": 8,
},
},
Object {
"end": Object {
"column": 48,
"line": 6,
"line": 8,
},
"start": Object {
"column": 43,
"line": 6,
"line": 8,
},
},
],
Expand All @@ -142,32 +142,32 @@ Object {
"loc": Object {
"end": Object {
"column": 40,
"line": 7,
"line": 9,
},
"start": Object {
"column": 30,
"line": 7,
"line": 9,
},
},
"locations": Array [
Object {
"end": Object {
"column": 40,
"line": 7,
"line": 9,
},
"start": Object {
"column": 30,
"line": 7,
"line": 9,
},
},
Object {
"end": Object {
"column": 53,
"line": 7,
"line": 9,
},
"start": Object {
"column": 43,
"line": 7,
"line": 9,
},
},
],
Expand All @@ -184,21 +184,21 @@ Object {
"decl": Object {
"end": Object {
"column": 29,
"line": 3,
"line": 5,
},
"start": Object {
"column": 9,
"line": 3,
"line": 5,
},
},
"loc": Object {
"end": Object {
"column": 1,
"line": 10,
"line": 12,
},
"start": Object {
"column": 49,
"line": 3,
"line": 5,
},
},
"name": "difference",
Expand All @@ -207,21 +207,21 @@ Object {
"decl": Object {
"end": Object {
"column": 36,
"line": 7,
"line": 9,
},
"start": Object {
"column": 30,
"line": 7,
"line": 9,
},
},
"loc": Object {
"end": Object {
"column": 40,
"line": 7,
"line": 9,
},
"start": Object {
"column": 30,
"line": 7,
"line": 9,
},
},
"name": "(anonymous_1)",
Expand All @@ -230,21 +230,21 @@ Object {
"decl": Object {
"end": Object {
"column": 49,
"line": 7,
"line": 9,
},
"start": Object {
"column": 43,
"line": 7,
"line": 9,
},
},
"loc": Object {
"end": Object {
"column": 53,
"line": 7,
"line": 9,
},
"start": Object {
"column": 43,
"line": 7,
"line": 9,
},
},
"name": "(anonymous_2)",
Expand All @@ -265,81 +265,81 @@ Object {
"0": Object {
"end": Object {
"column": 2,
"line": 10,
"line": 12,
},
"start": Object {
"column": 0,
"line": 3,
"line": 5,
},
},
"1": Object {
"end": Object {
"column": 39,
"line": 4,
"line": 6,
},
"start": Object {
"column": 27,
"line": 4,
"line": 6,
},
},
"2": Object {
"end": Object {
"column": 39,
"line": 5,
"line": 7,
},
"start": Object {
"column": 27,
"line": 5,
"line": 7,
},
},
"3": Object {
"end": Object {
"column": 48,
"line": 6,
"line": 8,
},
"start": Object {
"column": 27,
"line": 6,
"line": 8,
},
},
"4": Object {
"end": Object {
"column": 53,
"line": 7,
"line": 9,
},
"start": Object {
"column": 23,
"line": 7,
"line": 9,
},
},
"5": Object {
"end": Object {
"column": 43,
"line": 7,
"line": 9,
},
"start": Object {
"column": 36,
"line": 7,
"line": 9,
},
},
"6": Object {
"end": Object {
"column": 54,
"line": 7,
"line": 9,
},
"start": Object {
"column": 49,
"line": 7,
"line": 9,
},
},
"7": Object {
"end": Object {
"column": 15,
"line": 9,
"line": 11,
},
"start": Object {
"column": 2,
"line": 9,
"line": 11,
},
},
},
Expand Down
2 changes: 0 additions & 2 deletions e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts
Expand Up @@ -7,8 +7,6 @@
* @emails oncall+jsinfra
*/

/* eslint-disable import/no-unresolved */

import {Color} from '../types';
import {color} from '../entry';

Expand Down
1 change: 0 additions & 1 deletion e2e/babel-plugin-jest-hoist/entry.ts
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

// eslint-disable-next-line import/no-unresolved
import {Color} from './types';

export const color: Color = 'red';
2 changes: 2 additions & 0 deletions e2e/coverage-remapping/covered.ts
@@ -1,5 +1,7 @@
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

/* eslint-disable @typescript-eslint/no-unused-vars */

export = function difference(a: number, b: number): number {
const branch1: boolean = true ? 1 : 0;
const branch2: boolean = true ? 1 : 0;
Expand Down

0 comments on commit 72f19e5

Please sign in to comment.