Skip to content

Commit 04a6801

Browse files
gregtatumjasonLaster
authored andcommitted
Eslint import (firefox-devtools#5315)
1 parent f2e32ab commit 04a6801

File tree

103 files changed

+580
-683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+580
-683
lines changed

.eslintrc

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"parser": "babel-eslint",
3-
"plugins": ["react", "mozilla", "flowtype", "babel", "prettier"],
3+
"plugins": ["react", "mozilla", "flowtype", "babel", "prettier", "import"],
44
"globals": {
55
"atob": true,
66
"btoa": true,
@@ -70,6 +70,12 @@
7070
}
7171
],
7272

73+
// Check for import errors.
74+
"import/no-duplicates": "error",
75+
"import/no-unresolved": "error",
76+
"import/named": "error",
77+
"import/export": "error",
78+
7379
// Enforce the spacing around the * in generator functions.
7480
"generator-star-spacing": [2, "after"],
7581

bin/eslint-import-resolver.js

Whitespace-only changes.

docs/local-development.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ type ExpressionState = {
365365
expressions: List<Expression>
366366
};
367367

368-
export const State = makeRecord(
368+
export const createExpressionState = makeRecord(
369369
({
370370
expressions: List()
371371
}: ExpressionState)
372372
);
373373

374374
function update(
375-
state: Record<ExpressionState> = State(),
375+
state: Record<ExpressionState> = createExpressionState(),
376376
action: Action
377377
): Record<ExpressionState> {
378378
// ...
@@ -411,14 +411,14 @@ type ExpressionState = {
411411
expressions: List<Expression>
412412
};
413413

414-
export const State = makeRecord(
414+
export const createExpressionState = makeRecord(
415415
({
416416
expressions: List()
417417
}: ExpressionState)
418418
);
419419

420420
function update(
421-
state: Record<ExpressionState> = State(),
421+
state: Record<ExpressionState> = createExpressionState(),
422422
action: Action
423423
): Record<ExpressionState> {
424424
case "DELETE_EXPRESSION":

flow-typed/debugger-html.js

-309
This file was deleted.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"devtools-source-map": "^0.14.7",
7878
"devtools-splitter": "^0.0.6",
7979
"devtools-utils": "^0.0.10",
80+
"eslint-plugin-import": "^2.8.0",
8081
"fuzzaldrin-plus": "^0.6.0",
8182
"immutable": "^3.8.2",
8283
"lodash": "^4.17.4",

src/actions/ast.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
getFramework
2020
} from "../workers/parser";
2121

22-
import type { SourceId } from "debugger-html";
22+
import type { SourceId } from "../types";
2323
import type { ThunkArgs } from "./types";
2424

2525
export function setSourceMetaData(sourceId: SourceId) {

src/actions/ast/setInScopeLines.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
import { getOutOfScopeLocations, getSelectedSource } from "../../selectors";
66
import { getSourceLineCount } from "../../utils/source";
77

8-
import { range } from "lodash";
9-
import { flatMap } from "lodash";
10-
import { uniq } from "lodash";
11-
import { without } from "lodash";
8+
import { range, flatMap, uniq, without } from "lodash";
129

1310
function getOutOfScopeLines(outOfScopeLocations: AstLocation[]) {
1411
if (!outOfScopeLocations) {

0 commit comments

Comments
 (0)