File tree Expand file tree Collapse file tree 8 files changed +14
-10
lines changed Expand file tree Collapse file tree 8 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 13
13
"node": true,
14
14
"es6": true
15
15
},
16
- "extends": "eslint:recommended",
16
+ "extends": [
17
+ "eslint:recommended",
18
+ "plugin:flowtype/recommended"
19
+ ],
17
20
"ecmaFeatures": {
18
21
"arrowFunctions": true,
19
22
"blockBindings": true,
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export async function getDefaultLocalizedName(
49
49
{ messageFile, manifestData} : LocalizedNameParams
50
50
) : Promise < string > {
51
51
52
- let messageData : string | Buffer ;
52
+ let messageData : string | Buffer ;
53
53
let extensionName : string = manifestData . name ;
54
54
55
55
try {
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ export class ExtensionRunner {
306
306
return client . installTemporaryAddon ( this . sourceDir ) ;
307
307
}
308
308
309
- installAsProxy ( profile : FirefoxProfile ) : Promise < string | void > {
309
+ installAsProxy ( profile : FirefoxProfile ) : Promise < string | void > {
310
310
const { firefoxApp, sourceDir, manifestData} = this ;
311
311
return firefoxApp . installExtension (
312
312
{
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ export default function sign(
133
133
134
134
export async function getIdFromSourceDir (
135
135
sourceDir : string
136
- ) : Promise < string | void > {
136
+ ) : Promise < string | void > {
137
137
const filePath = path . join ( sourceDir , extensionIdFile ) ;
138
138
139
139
let content ;
@@ -167,8 +167,9 @@ export async function getIdFromSourceDir(
167
167
}
168
168
169
169
170
- export async function saveIdToSourceDir ( sourceDir : string , id : string )
171
- : Promise < void > {
170
+ export async function saveIdToSourceDir (
171
+ sourceDir : string , id : string
172
+ ) : Promise < void > {
172
173
const filePath = path . join ( sourceDir , extensionIdFile ) ;
173
174
await fs . writeFile ( filePath , [
174
175
'# This file was created by https://github.com/mozilla/web-ext' ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export function onlyInstancesOf(
89
89
*
90
90
*/
91
91
export function onlyErrorsWithCode (
92
- codeWanted : ( string | number ) | Array < string | number > ,
92
+ codeWanted : ( string | number ) | Array < string | number > ,
93
93
errorHandler : Function
94
94
) : Function {
95
95
return ( error ) => {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {WebExtError} from '../errors';
5
5
// Flow Types
6
6
7
7
export type FirefoxPreferences = {
8
- [ key : string ] : bool | string | number ,
8
+ [ key : string ] : boolean | string | number ,
9
9
} ;
10
10
11
11
export type PreferencesAppName = 'firefox' | 'fennec' ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {onlyErrorsWithCode} from '../errors';
14
14
* });
15
15
*
16
16
* */
17
- export default function isDirectory ( path : string ) : Promise < bool > {
17
+ export default function isDirectory ( path : string ) : Promise < boolean > {
18
18
return fs . stat ( path )
19
19
. then ( ( stats ) => stats . isDirectory ( ) )
20
20
. catch ( onlyErrorsWithCode ( [ 'ENOENT' , 'ENOTDIR' ] , ( ) => {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export default async function getValidatedManifest(
68
68
}
69
69
70
70
71
- export function getManifestId ( manifestData : ExtensionManifest ) : string | void {
71
+ export function getManifestId ( manifestData : ExtensionManifest ) : string | void {
72
72
return manifestData . applications ?
73
73
manifestData . applications . gecko . id : undefined ;
74
74
}
You can’t perform that action at this time.
0 commit comments