File tree Expand file tree Collapse file tree 8 files changed +1961
-589
lines changed Expand file tree Collapse file tree 8 files changed +1961
-589
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ export default [
2+ {
3+ "files" : [ "bin/tldr" ] ,
4+ "rules" : {
5+ "indent" : [ "error" , 2 ] ,
6+ "quotes" : [ "error" , "single" ] ,
7+ "linebreak-style" : [ "error" , "unix" ] ,
8+ "semi" : [ "error" , "always" ] ,
9+ "no-console" : "off" ,
10+ "arrow-parens" : [ "error" , "always" ] ,
11+ "arrow-body-style" : [ "error" , "always" ] ,
12+ "array-callback-return" : "error" ,
13+ "no-magic-numbers" : [ "error" , {
14+ "ignore" : [ - 1 , 0 , 1 , 2 ] ,
15+ "ignoreArrayIndexes" : true ,
16+ "detectObjects" : true
17+ } ] ,
18+ "no-var" : "error" ,
19+ "no-warning-comments" : "warn" ,
20+ "handle-callback-err" : "error"
21+ } ,
22+ "languageOptions" : {
23+ "ecmaVersion" : "latest" ,
24+ "sourceType" : "module" ,
25+ "globals" : {
26+ "node" : true ,
27+ "mocha" : true ,
28+ "es2019" : true
29+ }
30+ }
31+ }
32+ ] ;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class Cache {
6565 index . rebuildPagesIndex ( ) ,
6666 ] ) ;
6767 } )
68- // eslint-disable-next-line no-unused-vars
68+
6969 . then ( ( [ _ , shortIndex ] ) => {
7070 return shortIndex ;
7171 } ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Local cache is empty
1818Please run tldr --update
1919 ` ) ;
2020 this . name = 'EmptyCacheError' ;
21- // eslint-disable-next-line no-magic-numbers
21+
2222 this . code = 2 ;
2323 }
2424}
@@ -30,7 +30,7 @@ Page not found.
3030If you want to contribute it, feel free to send a pull request to: ${ repo }
3131 ` ) ;
3232 this . name = 'MissingPageError' ;
33- // eslint-disable-next-line no-magic-numbers
33+
3434 this . code = 3 ;
3535 }
3636}
@@ -39,7 +39,7 @@ class MissingRenderPathError extends TldrError {
3939 constructor ( ) {
4040 super ( 'Option --render needs an argument.' ) ;
4141 this . name = 'MissingRenderPathError' ;
42- // eslint-disable-next-line no-magic-numbers
42+
4343 this . code = 4 ;
4444 }
4545}
@@ -48,7 +48,7 @@ class UnsupportedShellError extends TldrError {
4848 constructor ( shell , supportedShells ) {
4949 super ( `Unsupported shell: ${ shell } . Supported shells are: ${ supportedShells . join ( ', ' ) } ` ) ;
5050 this . name = 'UnsupportedShellError' ;
51- // eslint-disable-next-line no-magic-numbers
51+
5252 this . code = 5 ;
5353 }
5454}
@@ -57,7 +57,7 @@ class CompletionScriptError extends TldrError {
5757 constructor ( message ) {
5858 super ( message ) ;
5959 this . name = 'CompletionScriptError' ;
60- // eslint-disable-next-line no-magic-numbers
60+
6161 this . code = 6 ;
6262 }
6363}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ module.exports = {
9191 } ) ;
9292 } ,
9393
94- // eslint-disable-next-line no-magic-numbers
94+
9595 uniqueId ( length = 32 ) {
9696 const size = Math . ceil ( length / 2 ) ;
9797 return crypto . randomBytes ( size ) . toString ( 'hex' ) . slice ( 0 , length ) ;
You can’t perform that action at this time.
0 commit comments