-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy patheslint.node_cli.txt
2543 lines (2270 loc) · 170 KB
/
eslint.node_cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
┏━━━━━━━━━━━━┓
┃ ESLINT ┃
┗━━━━━━━━━━━━┛
ALTERNATIVES ==> # - eslint (prefered): more rules, more configurable, more maintained
# - jscs: not maintained, merged with eslint
# - jshint
# - deno-lint:
# - Deno core
# - 100x faster than eslint
# - much fewer rules
# - not configurable
# - no autofix
VERSION ==> #9.23.0
#JavaScript linter, using Espree parser.
TYPE #ESTree type
SELECTOR #CSS-like but for ESTree:
# - TAG: ESTree TYPE
# - :statement|expression|declaration|function|pattern: abstract TYPE
# - ATTR[.ATTR2]: TYPE property
# - TAG * [ATTR] [ATTR=] [ATTR=/REGEXP/] [ATTR!=] [ATTR>] [ATTR<] [ATTR>=] [ATTR<=]
# > " " ~ + :first-child :last-child :nth-[last-]child() :not() :matches() !
┌───────────────────┐
│ CONFIGURATION │
└───────────────────┘
CONFIGURATION ==> #Can be from:
# - eslint --config|-c FILE
# - ./[../.../]eslint.config.js|mjs|cjs|ts|mts|cts: exporting CONF_ARR
# - *.*ts requires devDependency jiti
# - if FLAG unstable_config_lookup_from_file, uses linted file's DIR as cwd
CONF.name #'CONF_NAME'. Used in error messages
#By convention, is namespaced and /-delimited
CONF SHARED CONFIG ==> #Just use CONF as is
#Should have eslint as peerDependencies
#Can have several configs, by creating PACKAGE/FILE.js, and specifying extends 'PACKAGE/FILE'
@eslint/js #Shared ones:
# - configs.recommended: default set of rules (see online doc)
# - configs.all: all rules
export default #Same as export default CONF_ARR, except defineConfig() processes CONF.extends right away,
defineConfig(CONF_ARR) #allowing other consumers than eslint to understand it
COMMON CONFIGS ==> #Some famous configs are:
# - eslint-config-standard (17.1.0): feross standard coding style
# - eslint-config-airbnb: airbnb coding style
eslint --init
npm init @eslint/config #Create ./eslintconfig.js using interactive prompt
--debug #General debugging
--print-config #
--inspect-config #Debug CONF
--stats #Debug RULEs performance
--no-eslintrc #Disable old CONF format
--flag FLAG #Feature flag
┌───────────┐
│ FILES │
└───────────┘
eslint 'FILE|DIR_GLOB'... #
eslint --stdin #
eslint --stdin-filename FILE #
CONF.files|ignores #'GLOB'_ARR to include|exclude
#Use minimatch. Can use **. Can start with !
#Specifying 'DIR/' matches recursively
#Relative to CONF's DIR
#Def: **/*.js|cjs|mjs for files
#Always ignored: **/node_modules/, .git/
globalIgnores(ARR[, STR])->CONF #Returns { name STR (def: 'globalIgnores NUM'), ignores ARR }
eslint --ext '.EXT' #Def: ['.js', '.cjs', '.mjs']
eslint --ignore-pattern PATTERN #Similar to .gitignore (same syntax)
#Dot files are ignored unless whitelisted with '!...'
#Files in /node_modules are always ignored
eslint --no-ignore #Do not use --ignore-pattern
@eslint/compat #Includes .gitignore's content as CONF.ignores
includeIgnoreFile('PATH')->CONF #'PATH' must be absolute
eslint --no-warn-ignored #Do not warn when passing a file that matches ignored patterns
eslint --pass-on-no-patterns #Do not error when no 'GLOB' passed
eslint
--no-error-on-unmatched-pattern #Do not error when 'GLOB' does not match anything
┌───────────┐
│ RULES │
└───────────┘
eslint --parser PACKAGE
CONF.languageOptions.parser #{ parse(), parseForESLint() } (def: espree)
CONF.languageOptions.parserOptions
eslint --parser-options=VAR:VAL,..#Options to parser (see their doc)
CONF.languageOptions.ecmaVersion #YEAR_NUM, VERSION_NUM or 'latest' (def)
CONF.languageOptions.sourceType #'module' (def for '.js|mjs'), 'commonjs' (def for .cjs) or 'script'
CONF.rules.RULE RULE_CONF #RULE_CONF is either LEVEL or [LEVEL, CONF_VAL]
/* eslint RULE: RULE_CONF, ... */ #LEVEL can be "off|warn|error" (or 0|1|2)
eslint --rule 'RULE: RULECONF' #Exit code will be 1 on "error"
/* eslint-disable [RULE,...] */
/* eslint-enable [RULE,...] */ #
/* eslint-disable-line RULE,... */#End-of-line comment
/* eslint-disable-next-line RULE*/#
eslint-disable-inserter ##Add eslint-disable-next-line everywhere
##Uses stdin from `eslint --format json`
##Version 0.4.0
--no-fix-me ##Unless set, adds ... -- FIXME
--dry-run|-d ##Do not update files, only print them
/* eslint[-*] ... -- COMMENT */ #Can add COMMENT to any ESLint comment
eslint --no-inline-config
CONF.linterOptions.noInlineConfig #BOOL. Make ESLint comments noop
CONF.settings OBJ #Custom OBJ passed to every RULE
┌─────────────┐
│ GLOBALS │
└─────────────┘
CONF.languageOptions.globals.VAR #Declare global variables. STR can be:
# - 'off': cannot get/set
# - 'readonly': can get, cannot set
# - 'writable': can get/set
#Can use Node module "globals" (see its doc)
eslint --global GLOBAL[:STR] #BOOL must be true if not readonly
/* global VAR[:STR] */ #E.g. used by RULE no-undef
n/prefer-global/FEATURE [STR] #Whether should use global variable ('always', def) or import 'node:...' ('never')
#for FEATURE among:
# - 'buffer': import('buffer').Buffer
# - 'console': import('console')
# - 'process': import('process')
# - 'url': import('url').URL
# - 'url-search-params': import('url').URLSearchParams
# - 'text-encoder|decoder': import('util').TextEncoder|Decoder
┌───────────────┐
│ REPORTING │
└───────────────┘
eslint --output-file|-o FILE #
eslint --format|-f REPORTER #Output style
REPORTER #Package eslint-reporter-REPORTER:
# - is a FUNC(ERRORS_OBJ_ARR), with ERRORS_OBJ_ARR:
# - filePath STR
# - source STR
# - [fixable]errorCount NUM, [fixable]warningCount NUM
# - [suppressed]messages ERROR_OBJ_ARR:
# - ruleId 'RULE'
# - severity LEVEL_NUM
# - message STR
# - line|column NUM, [endLine|endColumn NUM]
# - nodeType TYPE
# - fix: range [NUM, NUM2], text STR (to apply --fix, optional)
# - usually use console or create output files
#Builtin:
# - 'stylish' (def)
# - 'html'
# - 'json'
# - 'json-with-metadata'
eslint --color|--no-color #
eslint --quiet #Only report errors
eslint --max-warnings NUM #Error if more than NUM warnings (def: -1)
eslint --exit-on-fatal-error #Exit code 2 instead of 1 on parsing error
┌─────────────┐
│ CACHING │
└─────────────┘
eslint
--cache #Caches checked files, and only check changed ones on next run
--cache-location FILE|DIR #Def: .eslintcache
--cache-strategy #Whether cache key is file 'metadata' (mtime, def) or 'content'
┌────────────┐
│ FIXING │
└────────────┘
eslint --fix #Automatically changes files to fix some of the rules
#See online doc for which rules use --fix
eslint --fix-dry-run #Dry run. Must be used with another --format
eslint --fix-type STR #Only apply --fix for one the types STR: 'problem', 'suggestion', 'layout', 'directive'
┌─────────────────┐
│ CUSTOM RULE │
└─────────────────┘
lib/rules/RULE.js #Main RULE file
#Name:
# - deduced from filename
# - should be lowercase dasherized, use no-* if forbids, no prefix if requires
#Exports an OBJ:
# - meta:
# - docs:
# - description STR: short description
# - category STR: categories among "Possible Errors", "Best Practices", "Strict Mode",
# "Variables", "Node.js and CommonJS", "Stylistic Issues", "ECMAScript 6"
# - recommended BOOL: whether it should be included in eslint:recommended
# - fixable 'code' or 'whitespace': for --fix
# - schema JSON_SCHEMA_ARR: matched against RULE_CONF (each ARR is one argument item)
# - deprecated BOOL (def: false)
# - messages OBJ: see below
# - create(CONTEXT)->OBJ:
# - SELECTOR[:exit](NODE):
# - called when traversing NODE top-down (or bottom-up if "exit")
# - onCodePathStart|End(CODEPATH, NODE)
# - onCodePathSegmentStart|End(CODEPATHSEGMENT, NODE)
# - onCodePathSegmentLoop(CODEPATHSEGMENT, CODEPATHSEGMENT2, NODE): when starting
# a CODEPATHSEGMENT that was already entered
CONTEXT.parserOptions #
CONTEXT.parserPath #
CONTEXT.id #'RULE'
CONTEXT.options #RULE_CONF, as ARR
CONTEXT.settings #CONF.settings
CONTEXT.report(PROBLEM) #Report warning|error, where PROBLEM is:
# - message STR
# - messageId STR: same as message, but using OBJ.meta.messages.STR
# - data OBJ: placeholder data, which can used in message as {{VAR}}
# - node NODE
# - loc: start|end.line|column NUM (def: use NODE)
# - fix(FIXER)->FIXER_RET[_ARR]: applied with --fix, with FIXER:
# - insertTextAfter|Before[Range](NODE|TOKEN|RANGE, STR)->FIXER_RET
# - remove[Range](NODE|TOKEN|RANGE)->FIXER_RET
# - replaceText[Range](NODE|TOKEN|RANGE)->FIXER_RET
CONTEXT.getScope()->OBJ #
CONTEXT.getAncestors()->NODE_ARR #
CONTEXT.getFilename()->'FILE' #
CONTEXT.getDeclaredVariables(NODE)#
CONTEXT.markVariableAsUsed('VAR') #For no-unused-vars RULE
CONTEXT.getSourceCode()->SOURCECOD#
SOURCECODE.text #'JS'
SOURCECODE.lines #'JS'_ARR
SOURCECODE.ast #PROGRAM_NODE
SOURCECODE.hasBOM #BOOL
SOURCECODE.getText
(NODE[, NUM][, NUM2])->'JS' #NUM is extra chars before NODE (def: 0), NUM is extra chars after (def: 0)
SOURCECODE.getNodeByRangeIndex
(OFFSET)->NODE #
SOURCECODE.getTokenByRangeStart
(OFFSET, OPTS)->TOKEN #OPTS: includeComments BOOL (def: false)
SOURCECODE.getLocFromIndex(OFFSET)
->LOC #
SOURCECODE.getIndexFromLoc(LOC)
->OFFSET #
SOURCECODE.getLoc(NODE|TOKEN)->LOC#
SOURCECODE.getRange
(NODE|TOKEN)->OFFSET #
SOURCECODE.getTokens(NODE)
->TOKEN_ARR #
SOURCECODE.getFirst|LastToken[s] #FILTER_OPTS:
(NODE[, OPTS])->TOKEN[_ARR] # - filter(TOKEN)->BOOL
# - includeComments BOOL (def: false)
# (if no "s")
# - skip NUM (def: 0)
# (if "s")
# - count NUM (def: 0): max number
SOURCECODE.getToken[s]After|Before
(NODE|TOKEN[, OPTS])->TOKEN[_ARR]#
SOURCECODE.getTokensBetween
(NODE|TOKEN, NODE|TOKEN2)
->TOKEN_ARR #
SOURCECODE.
getFirst|LastToken[s]Between
(NODE|TOKEN, NODE|TOKEN2[, OPTS])
->TOKEN[_ARR] #
SOURCECODE.getAllComments()
->STR_ARR #
SOURCECODE.getCommentsBefore|
After|Inside(NODE|TOKEN)->STR_ARR#
SOURCECODE.getJSDocComment(NODE)
->STR|null #
CODEPATH #Blocks, including functions. Includes several CODEPATHSEGMENT
CODEPATH.id #Unique id
CODEPATH.upper #Parent CODEPATH
CODEPATH.childCodePaths #CODEPATH_ARR
CODEPATH.initialSegment #First CODEPATHSEGMENT
CODEPATH.finalSegments #Possible last CODEPATHSEGMENT_ARR, e.g. return|throw statements
#RULE node/process-exit-as-throw fixes CODEPATH.finalSegments so it includes process.exit()
CODEPATH.returned|thrownSegments #Same for only return|thrown
CODEPATHSEGMENT #Statements or part of statements
CODEPATHSEGMENT.id #Unique id
CODEPATHSEGMENT.prev|nextSegments #CODEPATHSEGMENT_ARR
CODEPATHSEGMENT.reachable #BOOL
tests/lib/rules/RULE.js #Each rule must have tests
RULETESTER #Helper, available under /lib/testers/rule-tester
RULETESTER.run('RULE', RULE, OPTS)#Unit tests a RULE. OPTS:
# - valid OBJ_ARR (or STR_ARR shorthand):
# - code 'JS'
# - [globals 'VAR'_ARR]
# - [options RULE_CONF] (i.e. ARR)
# - [settings OBJ]
# - [filename STR]
# - [parserOptions OBJ]
# - [before|after FUNC()]
# - invalid OBJ_ARR: same as valid, with also:
# - errors OBJ_ARR (or STR_ARR shorthand):
# - message STR
# - [type TYPE]
# - [line|column NUM]
TIMING=1 eslint --no-eslintrc
--rule "RULE: RULE_CONF" #Rules performance testing
┌─────────────┐
│ PLUGINS │
└─────────────┘
eslint --plugin PACKAGE #PLUGIN_OBJ to use
CONF.plugins.PLUGIN #All new properties added by plugins are accessible under names prefixed with "PLUGIN/"
#Must have peerDependencies eslint
PLUGIN #Main object exported by plugins
PLUGIN.configs.CONF_NAME CONF #Add new CONF (like eslint-config-* does)
#If CONF_NAME is 'flat/NAME', uses NAME unless using old version of ESLint
PLUGIN.rules.RULE RULE #Add new rules
PLUGIN.environments.ENV
.globals|parserOptions #Add new ENV
PLUGIN.processors.".EXT" OBJ #OBJ:
# - preprocess(STR, 'FILE')->STR_ARR
# - postprocess(STR_ARR_ARR, 'FILE')->STR_ARR
#E.g. to lint JavaScript inside HTML
CONF.processor #'PLUGIN/PROCESSOR_NAME'. Apply a PLUGIN processor
#Can also be an OBJ { preprocess(), postprocess() }
@eslint/compat #Allows using plugin that did not update to ESLint v9+
#Version 1.2.7, part of repo `eslint/rewrite`
fixupPluginRules
(PLUGIN_OBJ)->PLUGIN_OBJ #
fixupConfigRules(OBJ)->OBJ #Same for recommended configs
┌──────────────┐
│ WRAPPERS │
└──────────────┘
STANDARD ==> #Node module "standard" from feross (17.1.2)
#Is a wrapper around ESLint with a different default config (eslint-config-standard)
SEMISTANDARD ==> #Node module (11.0.0)
#Is a wrapper around ESLint with a different default config (eslint-config-semistandard)
XO ==> #Node module (0.18.2)
#Is a wrapper around ESLint with:
# - a different default config (eslint-config-standard)
# - different reporter: eslint-formatter-pretty
# - includes plugins: eslint-plugin-unicorn, eslint-plugin-import, eslint-plugin-ava,
# eslint-plugin-promise
# - different default for:
# parserOptions: ecmaVersion 2017, sourceType 'module',
# ecmaFeatures: jsx true
# --ignore-pattern: node_modules/, bower_components/, coverage/, t[e]mp/, *.min.js,
# bundle.js, fixture*/, vendor/, dist/
# --cache
# - convenient options to configure several related RULEs at once: --space NUM,
# --no-semicolon and --no-esnext
# - can open files with problems with xo --open
ESLINT-NIBBLE ==> #Node module (3.1.2)
#Runs like eslint except different reporter:
# - shows graphs of number of errors, per error type
# - can show code samples of all instances of one specific error type
#Good when introducing ESLint to a project, and building the ESLint CONF
#CLI flags: --config
GULP-ESLINT ==> #Node module (6.0.0)
GULP-ESLINT(OBJ|'CONF_FILE') #Fires eslint and populates VINYL.eslint
#OBJ are ESLint options
#--cache is not supported.
GULP-ESLINT.result
(FUNC(ERROR_OBJ)) #Fires FUNC(ERROR_OBJ) for each error in VINYL.eslint (see above for ERROR_OBJ format)
GULP-ESLINT.results
(FUNC(ERRORS_OBJ)) #Fires FUNC(ERRORS_OBJ) once
GULP-ESLINT.format[Each] #Prints eslint output, using VINYL.eslint
(['REPORTER'][, OSTREAM|FUNC]) #Def OSTREAM is process.stdout. FUNC is FUNC(STR)
#If "Each", called for each file
GULP-ESLINT.failOn|AfterError() #Stops task on first|last error in VINYL.eslint
@stylistic/eslint-plugin #Code formatting rules (4.2.0)
#Comprises the following subpackages
@stylistic/eslint-plugin-js #
@stylistic/eslint-plugin-jsx
@stylistic/eslint-plugin-ts #
@stylistic/eslint-plugin-plus #
@stylistic[/js|jsx|ts|plus]/RULE #RULEs from that package
┏━━━━━━━━━━━┓
┃ RULES ┃
┗━━━━━━━━━━━┛
┌──────────────┐
│ COMMENTS │
└──────────────┘
no-inline-comments [OBJ] #Avoid non-full-line comments
#OBJ:
# - ignorePattern 'REGEXP'
@stylistic/js/ #How multiline comments should look like, with STR:
multiline-comment-style # - 'starred-block' (def): /*
[STR] [OBJ] # *
# */
# - 'bare-block': /*
# ... */
# - 'separate-lines': //
# //
#OBJ:
# - checkJSDoc BOOL (def: false):
# - applies to JSDoc comments
# - always false when using 'bare-block'
@stylistic/js/ #Position of line comments
line-comment-position [OBJ] #OBJ:
# - position 'above' (def) or 'beside' (i.e. end of line)
# - ignorePattern 'REGEXP'
# - applyDefaultIgnorePatterns BOOL: if true (def), ignores words starting with
# eslint|jshint|jslint|istanbul|global|exported|jscs|fallsthrough
@stylistic/js|ts/ #Where comments can be put
lines-around-comment [OBJ] #OBJ:
# - before|afterBlockComments BOOL (def: true, false): requires empty line before|after /* */
# - before|afterLineComments BOOL (def: false): requires empty line before|after //
# - afterHashbangComment BOOL (def: false): requires empty line after shebang
# - allowBlockStart|End BOOL (def: false): allow comment at beginning|end of { } block
# - allowObjectStart|End BOOL (def: false): allow comment at beginning|end of { } OBJ
# - allowClassStart|End BOOL (def: false): allow comment at beginning|end of { } CLASS
# - allowArrayStart|End BOOL (def: false): allow comment at beginning|end of [] ARR
# - ignorePattern 'REGEXP'
# - applyDefaultIgnorePatterns BOOL: if tre (def), ignores words starting with
# eslint|jshint|jslint|istanbul|global|exported|jscs|fallsthrough
# (TypeScript only)
# - allowInterfaceStart|End BOOL (def: false)
# - allowTypeStart|End BOOL (def: false)
# - allowEnumStart|End BOOL (def: false)
# - allowModuleStart|End BOOL (def: false)
@stylistic/js/ #Space after // or /*
spaced-comment [STR] [OBJ] #STR: 'always' (def) or 'never'
#OBJ:
# - exceptions STR_ARR: check for non-REGEXP pattern anywhere in comment
# - markers STR_ARR: check for non-REGEXP pattern at start of comment
# - block|line OBJ: same options, but only for // or only /* */
# - balanced BOOL:
# - whether this applies also to space before */
# - must be inside OBJ.block
capitalized-comments [STR] [OBJ] #Whether comments should start with uppercase or lowercase
#STR: 'always' (def) or 'never'
#OBJ:
# - ignorePattern 'REGEXP': ignores if first words matches
# By def., ignores if starts with jscs|jshint|eslint|istanbul|global[s]|exported
# - ignoreInlineComments BOOL (def: false): if true, only for full-line comments
# - ignoreConsecutiveComments BOOL (def: false): only check first line of comment blocks
no-warning-comments [OBJ] #Avoid comments like TODO|FIXME
#OBJ:
# - terms STR_ARR (def: 'todo', 'fixme', 'xxx'): matched whole word, case-insensitive
# - location 'start' (def) or 'anywhere'
# - decoration STR_ARR: characters forbidden in beginning of comment
unicorn/expiring-todo-comments #Avoid comments like TODO|FIXME unless they are followed by [CONDITION,...] and met one of them
[OBJ] #CONDITION can be:
# - YYYY-MM-DD
# - >SEMVER: against PACKAGE.version
# - +PKGNAME or -PKGNAME: whether exists in PACKAGE.[dev]dependencies
# - PKGNAME@>SEMVER: against PACKAGE.[dev]dependencies version
# - engine:NAME@>SEMVER: against PACKAGE.engines[NAME]
#OPTS:
# - terms STR_ARR (def: ['todo', 'fixme', 'xxx'])
# - allowWarningComments BOOL (def: true): if false, disable "no-warning-comments" rule
# - ignoreDatesOnPullRequests BOOL (def: false): disable YYYY-MM-DD when it's a PR
# - ignore STR|REGEXP_ARR
# - date "YYYY-MM-DD"
eslint-comments/* #Module "eslint-plugin-eslint-comments" (3.2.0)
eslint-comments/ #Every /* eslint-disable */ must be followed by a /* eslint-enable */
disable-enable-pair [OBJ] #OBJ: allowWholeFile BOOL
eslint-comments/no-unused-enable #Every /* eslint-enable */ must be after a /* eslint-disable */
eslint-comments/
no-duplicate-disable #No duplicate /* eslint-disable */
eslint-comments/
no-unlimited-disable #/* eslint-disable RULE */ only, not /* eslint-disable */
unicorn/no-abusive-eslint-disable #/* eslint-disable RULE */ only, not /* eslint-disable */
eslint-comments/
no-aggregating-enable #No /* eslint-enable */ after several /* eslint-disable [RULE] */
eslint-comments/
no-restricted-disable 'GLOB'_ARR #No /* eslint-disable RULE */ with RULE matching 'GLOB'
eslint-comments/no-use [OBJ] #Forbids all ESLint comments
#OBJ: allow STR_ARR, among 'eslint', 'eslint-disable|enable', 'eslint-disable-[next-]line',
#'eslint-env', 'exported', 'global[s]'
eslint-comments/ #Require a comment before /* eslint-* */
require-description [OBJ] #OBJ:
# - ignore STR_ARR: same values as eslint-comments/no-use OBJ.allow
eslint-comments/no-unused-disable #No /* eslint-disable */ if no rule is broken
eslint --report-unused-disable
-directives-severity
CONF.linterOptions #'off' (def), 'warn', 'error'
.reportUnusedDisableDirectives #No /* eslint-disable|enable */ if no rule is broken
eslint
--report-unused-inline-configs
CONF.linterOptions #'off' (def), 'warn', 'error'
.reportUnusedInlineConfigs #No /* eslint RULE ... */ if no rule is broken
┌────────────┐
│ STRICT │
└────────────┘
strict [STR] #For 'use strict':
# - 'global' (def is CommonJS module): must add one on top of file
# - 'function' (def otherwise): must add one on top of each function
# - 'never' (def if ES module)
┌─────────────────────┐
│ LONG STATEMENTS │
└─────────────────────┘
@stylistic/js/ #When using newlines-separated chained operations, e.g. ... && ... && ...,
operator-linebreak [STR] [OBJ] #where to put the operators.
#STR: 'after' (def, end of line), 'start' (start of line), 'none' (inside line)
#OBJ: overrides.OPERATOR STR (def: ? and : 'before')
@stylistic/js/ #Forces newlines before dots in dot-delimited chains
newline-per-chained-call [OBJ] #OBJ: ignoreChainWithDepth NUM (def: 2): ignore if chain has <= NUM items
@stylistic/js/dot-location [STR] #In multiline dot-delimited chains, dot at end of line (STR "object", def) or beginning of line (STR "property")
@stylistic/js/
no-whitespace-before-property #Avoid VAR .VAR2, i.e. dot-delimited chain with whitespaces before dot
┌─────────────────┐
│ BLANK LINES │
└─────────────────┘
@stylistic/js/ #Max consecutive empty lines
no-multiple-empty-lines [OBJ] #OBJ:
# - max NUM (def: 2)
# - maxEOF|maxBOF NUM: same for end|beginning of file
@stylistic/js|ts/ #Empty lines between statements, according to their type.
padding-line-between-statements #OBJ:
OBJ... # - blankLine: 'always' (requires), 'never' (forbids), 'any' (ignores)
# - prev|next STR[_ARR]:
# - type of statement before|after the blank lines
# - can be:
# - '*': any statement
# - block: {} (not associated with a structure)
# - [multiline-]block-like: any {} block
# - multiline: multiple lines
# - iife
# - [multiline|singleline-]const|var|let
# - function|class: declarations
# - import|cjs-export|cjs-import
# - [multiline|singleline-]export
# - switch|case|default
# - for|if|while|do
# - break|continue
# - debugger|return
# - try|throw
# - with
# - directive: 'use strict'
# - empty: single ;
# - expression: EXPR
# (TypeScript only)
# - interface
# - type
# - enum
# - function-overload
#If several OBJ..., last one has priority.
@stylistic/js/ #Empty lines at start and of end of {} blocks
padded-blocks [STR] [OBJ] #STR: 'always' (def), 'never' or only 'start|end'
#OBJ: blocks|classes|switches STR:
# - same for specific type of block
# - note that STR is shorthand for OBJ.blocks only
@stylistic/js|ts/ #Empty line between CLASS members: 'always' (def) or 'never'
lines-between-class-members #Can also be OBJ: enforce OBJ_ARR:
[STR|OBJ] [OBJ2] # - blankLine 'always|never'
# - prev|next 'method|field|*'
#OBJ2:
# - exceptAfterSingleLine BOOL (def: false)
# (TypeScript only)
# - exceptAfterOverload BOOL (def: true): ignore overloaded methods
┌─────────────────┐
│ INDENTATION │
└─────────────────┘
@stylistic/js|ts/ #Indentation
indent [VAL] [OBJ] #VAL: NUM (def: 4) or 'tab'
#OBJ, for number of indents in (multi-line):
# - SwitchCase NUM (def: 0): switch cases
# - VariableDeclarator[.var|let|const] NUMM (def: 1): declarations
# - outerIIFEBody NUM|'off' (def: 1): IIFE
# - MemberExpression NUMM (def: 1): VAR.VAR2...
# - FunctionDeclaration|FunctionExpression:
# - parameters NUMM (def: 1)
# - body NUM (def: 1)
# - CallExpression.arguments NUMM (def: 1)
# - StaticBlock.body NUMM (def: 1): class { static ... }
# - ArrayExpression NUMM (def: 1): ARR
# - ObjectExpression NUMM (def: 1): OBJ
# - ImportDeclaration NUMM (def: 1): import
# - flatTernaryExpressions BOOL: if false (def), nested ?: must be indented
# - offsetTernaryExpressions BOOL: if false (def), ?: must not be indented
# - offsetTernaryExpressionsOffsetFunctionCalls BOOL: if false (def: true),
# named arguments in FUNC calls inside ?: must not be indented
# - ignoredNodes SELECTOR
# - ignoreComments BOOL (def: false)
# - tabLength NUM (def: 4): \t inside template `...`
#NUMM means either:
# - NUM
# - 'first': must be aligned with first one
# - 'off': disables check
@stylistic/js/no-tabs [OBJ] #Avoid tabs
#OBJ: allowIndentationTabs BOOL (def: false)
@stylistic/js/ #Avoid mixed spaces and tabs for indentation
no-mixed-spaces-and-tabs [STR] #If STR 'smart-tabs': allow tabs when used for alignment
@stylistic/plus/ #Indentation before binary OP (like && or ||) on a new line
indent-binary-ops [VAL] #VAL: NUM (def: 4) or 'tab'
unicorn/template-indent [OBJ] #Indentation inside `...` STR
#OBJ:
# - indent NUM|STR (def: guessed)
# - tags|functions|selectors|comments STR: only applied on specific `...` preceded by those
┌─────────────────┐
│ WHITESPACES │
└─────────────────┘
@stylistic/js/ #No trailing spaces
no-trailing-spaces [OBJ] #OBJ:
# - skipBlankLines BOOL (def: false)
# - ignoreComments BOOL (def: false)
@stylistic/js/ #Avoid multiple spaces
no-multi-spaces [OBJ] #OBJ:
# - ignoreEOLComments BOOL (def: false): ignore at end of line if there is a //COMMENT
# - exceptions.TYPE BOOL (def: {Property: true, ImportAttributes: true}): ignored for TYPEs
# - includeTabs BOOL (def: true)
no-irregular-whitespace [OBJ] #Avoid any whitespace that is not \n \r \t or space.
#This includes \v \f NBSP BOM ZWSP and many Unicode ones
#OBJ:
# - skipComments BOOL (def: false)
# - skipStrings BOOL (def: true)
# - skipTemplates BOOL (def: false)
# - skipRegExps BOOL (def: false)
# - skipJSXText BOOL (def: false)
@stylistic/js/
linebreak-style [STR] #Whether linebreak should be 'unix' (def, LF) or 'windows' (CRLF)
@stylistic/js/eol-last [STR] #Files must end with LF
#STR: 'always' (def), 'never'
unicode-bom [STR] #Unicode BOM
#STR: 'always' or 'never' (def)
@stylistic/ts/ #Spaces around TYPE-specific tokens.
type-annotation-spacing [OBJ] #OBJ:
# - before BOOL
# - after BOOL
# - overrides.TYPE.before|after BOOL: same for specific TYPE among:
# (def: before true, after true)
# - arrow: (...) => ...
# (def: before false, after true)
# - colon: all of the ones below
# - variable: VAR: TYPE
# - property: { VAR: TYPE, ... }
# - parameter: (ARG: TYPE)
# - returnType: (...): TYPE
┌────────────┐
│ BRACES │
└────────────┘
curly [STR] [STR2] #Using {} around statements
#STR:
# - 'all' (def): always {}
# - 'multi': {} if multiple statements, no {} if single
# - 'multi-line': {} if multiple lines
# - 'multi-or-nest': {} if multiple statements or lines, no {} otherwise
#STR2:
# - 'consistent': each part of if|else chain must have same braces style
@stylistic/js|ts/ #{} style
brace-style [STR] [OBJ] #STR:
# - '1tbs' (def)
# if ... {
# } else {
# }
# - 'stroustrup'
# if ... {
# }
# else {
# }
# - 'allman'
# if ...
# {
# }
# else
# {
# }
#OBJ: allowSingleLine BOOL (def: false): allow { ... }
@stylistic/js/ #Where to put single statement blocks that do not use {}
nonblock-statement-body-position #STR: 'besides' (def, same line), 'below' (next line), 'any' (no requirement)
[STR] [OBJ] #OBJ: overrides.KEYWORD STR (same for a specific keyword)
┌────────────┐
│ SPACES │
└────────────┘
@stylistic/js|ts/ #Spaces inside single-line {}
block-spacing [STR] #STR: 'always' (def), 'never'
@stylistic/js|ts/ #Spaces between {}
object-curly-spacing [STR] [OBJ] #STR: 'always', 'never' (def)
#OBJ:
# - objectInObjects BOOL (def: depends on 'always|never'): space if OBJ item
# - arraysInObjects BOOL (def: depends on 'always|never'): space if ARR item
#'always' does not require spaces inside empty OBJ
unicorn/empty-brace-spaces #Forbid spaces between empty {}
@stylistic/js|ts/ #Spaces before {} block
space-before-blocks [STR|OBJ] #STR: 'always' (def), 'never' or 'off'
#OBJ: functions|keywords|classes STR: same for a specific block type
@stylistic/plus/curly-newline #Newlines after { and before }
[STR|OBJ] #STR: 'always' or 'never'
#OBJ:
# - multiline BOOL: requires newlines if any newline between statements
# - minElements NUM: requires newlines if >= NUM statements
# - consistent BOOL (def: true): requires either all newlines or no newlines
# - TYPE OBJ:
# - same options but only for a specific type
# - TYPE can be IfStatement ForStatement ForInStatement ForOfStatement
# WhileStatement DoWhileStatement SwitchStatement SwitchCase TryStatementBlock
# TryStatementHandler TryStatementFinalizer BlockStatement FunctionDeclaration
# FunctionExpression Property ClassBody StaticBlock WithStatement TSEnumBody
# TSInterfaceBody TSModuleBlock
@stylistic/js/ #Spaces inside []
array-bracket-spacing [STR] [OBJ]#STR: 'always', 'never' (def)
#OBJ:
# - singleValue BOOL (def: depends on 'always|never'): space if single item
# - objectInArrays BOOL (def: depends on 'always|never'): space if OBJ item
# - arraysInArrays BOOL (def: depends on 'always|never'): space if ARR item
#'always' does not require spaces inside empty ARR
@stylistic/js/ #Space around [] in OBJ[VAR] or { [VAR] }
computed-property-spacing #STR: 'never' (def), 'always'
[STR] [OBJ] #OBJ:
# - enforceForClassMembers BOOL (def: true)
@stylistic/js/ #Space inside ()
space-in-parens [STR] [OBJ] #STR: 'always' or 'never' (def)
#OBJ: exceptions STR_ARR, among '{}', '[]', '()', 'empty'
@stylistic/js/ #Space between TAG and `...`
template-tag-spacing [STR] #STR: 'always' or 'never' (def)
@stylistic/js/ #Space inside ${}
template-curly-spacing [STR] #STR: 'always' or 'never' (def)
@stylistic/js|ts/ #Space around comma
comma-spacing [OBJ] #Not checked for sparsed ARR elements
#OBJ: before|after BOOL (def: false, true)
@stylistic/js|ts/semi-spacing #Spaces around ;
[OBJ] #OBJ: before|after BOOL (def: false, true)
@stylistic/js|ts/key-spacing [OBJ]#Space around : in OBJ: VAR
#OBJ:
# - beforeColon|afterColon BOOL (def: false, true)
# - mode 'strict' (def) or 'minimum': whether to allow multiple spaces
# - align 'colon' (colons must align), 'value' (values must align)
# - align OBJ: with OBJ.on 'colon|value', and OBJ same as above
# - singleLine|multiLine OBJ: same OBJ as above, but restrict to single-line or
# multiline OBJs
# - ignoredNodes SELECTOR: do not apply for those NODEs
@stylistic/js/ #Space around : in switch case|default
switch-colon-spacing [OBJ] #OBJ: before|after BOOL (def: false, true)
@stylistic/js/ #Space around operators
space-unary-ops [OBJ] #OBJ:
# - words BOOL (def: true): space around new|delete|typeof|void|yield
# - nonwords BOOL (def: false): space around - ++ -- + !
# - overrides.KEYWORD BOOL
@stylistic/js|ts/ #Space around keywords
keyword-spacing [OBJ] #OBJ:
# - before|after BOOL (def: true): for all keywords
# - overrides.KEYWORD.before|after BOOL: for specific keywords
@stylistic/js|ts/ #Space around ++ --
space-infix-ops [OBJ] #OBJ:
# - int32Hint BOOL (def: true): allow no space around |0 (used sometimes for typecasting)
# - ignoreTypes BOOL (def: false): allow writing TYPE|TYPE2 without space
@stylistic/js/ #Space between ... and VAL in ...VAL
rest-spread-spacing [STR] #STR: 'always' or 'never' (def)
@stylistic/js|ts/ #Space in-between FUNC and (...) in "FUNC(...)"
function-call-spacing [STR] [OBJ]#STR: 'always', 'never' (def)
#OBJ:
# - allowNewlines BOOL (def: false)
# - optionalChain.before|after BOOL (def: false): with OBJ?.(...)
function-call-argument-newline #Newlines before each argument
[STR] #STR: 'always' (def), 'never', 'consistent'
@stylistic/js|ts/ #Space before (...) in function [NAME](...)
space-before-function-paren #STR: 'always' (def) or 'never'
[STR|OBJ] #OBJ: anonymous|named|asyncArrow STR:
# - same for a specific function type
# - not using OBJ will only target anonymous|named
@stylistic/js/arrow-spacing [OBJ] #Space around =>
#OBJ: before|after BOOL (def: true, true)
@stylistic/js/ #Space around * in generator FUNC
generator-star-spacing [OBJ] #OBJ:
# - before|after BOOL (def: true, false)
# - named|anonymous|method: before|after BOOL or "after|before|both|neither"
@stylistic/js/ #Space around * in yield* VAL
yield-star-spacing [STR|OBJ] #OBJ: before|after BOOL (def: false, true)
#STR: 'after', 'before', 'both', 'neither' (shorthands)
┌────────────────┐
│ SEMICOLONS │
└────────────────┘
@stylistic/js|ts/semi [STR] [OBJ] #Semicolons at end of statements.
#STR: 'always' (def), 'never' (unless required for ambiguity)
#OBJ:
# (when 'always')
# - omitLastInOneLineBlock BOOL (def: false): ignored if last statement of a one-line {} block
# - omitLastInOneLineClassBody BOOL (def: false): ignored in last declaration of a one-line CLASS {} block
# (when 'never')
# - beforeStatementContinuationChars "any|always|never": ignores|requires|forbis semicolons if
# next line starts with [ ( / + -
@stylistic/js/semi-style [STR] #Whether to put ; at start or end of line
#STR: 'last' (def), 'first'
no-unexpected-multiline #Avoid multilines statements that would be interpreted as two statements if semicolons were
#inserted.
@stylistic/js|ts/no-extra-semi #Avoid useless semicolons, e.g. {};
@stylistic/ts/ #Delimiter at end of each OBJ member
member-delimiter-style [OBJ] #OBJ:
# - multiline:
# - delimiter 'semi' (def), 'comma' or 'none'
# - requireLast BOOL (def: true): trailing
# - singleline:
# - delimiter 'semi' (def) or 'comma'
# - requireLast BOOL (def: false): trailing
# - overrides.TYPE.delimiter|requireLast: for specific TYPE 'interface|typeLiteral'
# - multilineDetection: multiline if:
# - 'brackets' (def): there is any newline
# - 'last-member': last member on last line as end bracket
┌────────────────┐
│ STATEMENTS │
└────────────────┘
no-empty [OBJ] #Avoid empty block statements, unless they contain comments
#OBJ: allowEmptyCatch BOOL (def: false) (ignore if catch clause)
no-unreachable #Avoid statements that cannot be reached because of an early return|throw|break|continue
no-unreachable-loop [TYPE_ARR] #Avoid loops that never iterates more than once
#TYPE_ARR are types to ignore, among '[Do]WhileStatement|For[In|Of]Statement'
┌─────────────────┐
│ PARENTHESIS │
└─────────────────┘
@stylistic/js|ts/ #Avoid unnecessary parentheses
no-extra-parens [STR] [OBJ] #STR: "all" (def), "functions" (only around FUNC expressions)
#OBJ:
# - conditionalAssign BOOL: ignore around assignments inside TEST
# - returnAssign BOOL: ignore around assignments in return statement
# - nestedBinaryExpressions BOOL: ignore around chained binary operators
# - ignoreJSX "none", "all", "multi-line", "single-line":
# ignore around JSX, providing it is multi-line or single-line
# - enforceForArrowConditionals BOOL: ignore around (...) => ?:
# - enforceForSequenceExpressions BOOL: ignore around ..., ...
# - enforceForNewInMemberExpressions BOOL: ignore around new ...
# - enforceForFunctionPrototypeMethods BOOL: ignore around function (){}.call|apply()
# - allowParensAfterCommentPattern 'REGEXP': ignore if preceded by /* STR */
# - ternaryOperandBinaryExpressions BOOL (def: true): including around BOOL of: BOOL ? ... : ...
# - nestedConditionalExpressions BOOL (def: false): ignore around ... ? ... : ...
@stylistic/js/ #Must add extra (even useless) parenthesis around operators to clarity order,
no-mixed-operators [OBJ] #when using several operators.
#OBJ:
# - groups 'OP'_ARR_ARR:
# - will force parenthesis inside each group (not between groups)
# - def:
# + - * / % **
# & | ^ ~ << >> >>>
# == != === !== > >= < <=
# && ||
# in instanceof
# ?:
# - allowSamePrecedence BOOL: if true (def), ignore if two operators have same precedence
@stylistic/js/ #IIFE parenthesis wrapping.
wrap-iife [STR] [OBJ] #STR:
# - 'outside' (def): (function ... {}())
# - 'inside': (function ... {})()
# - 'any': either
#OBJ:
# - functionPrototypeMethods BOOL (def: false): also when FUNC is fired using call|apply()
unicorn/no-unreadable-iife #Avoid complex-looking IIFEs
┌────────────────┐
│ COMPLEXITY │
└────────────────┘
@stylistic/js/max-len [NUM|OBJ] #Maximum line length (Unicode chars)
#NUM, or OBJ:
# - code NUM (def: 80): for generic lines
# - tabWidth (def: 4)
# - comments NUM (def: same as code): for comments
# - ignorePattern 'REGEXP'
# - ignore[Trailing]Comments BOOL (def: false): ignore non-full-line|trailing comments
# - ignoreUrls|Strings|TemplateLiterals|RegExpLiterals BOOL (def: false)
max-lines [NUM|OBJ] #Max number of lines per file
#NUM, or OBJ:
# - max NUM (def: 300)
# - skipBlankLines BOOL (def: false)
# - skipComments BOOL (def: false)
max-lines-per-function [NUM|OBJ] #Max number of lines per function
#NUM, or OBJ:
# - max NUM (def: 50)
# - skipBlankLines BOOL (def: false)
# - skipComments BOOL (def: false)
# - IIFEs BOOL (def: false): include (function() {}(...))
max-statements [NUM|OBJ] #Max number of statements per function
#NUM, or OBJ:
# - max NUM (def: 10)
# - ignoreTopLevelFunctions BOOL (def: false)
@stylistic/js/ #Max number of statements per line
max-statements-per-line [OBJ] #OBJ:
# - max NUM (def: 1)
# - ignoredNodes 'TYPE'_ARR (def: [])
import/max-dependencies [OBJ] #Avoid more than OBJ.max NUM (def: 10) import|require per file
#OBJ:
# - ignoreTypeImports BOOL (def: false): ignore TypeScript type imports
complexity [NUM|OBJ] #Maximum cyclomatic complexity
#OBJ:
# - max NUM (def: 20) of branches|paths per function
# - variant:
# - 'classic' (def)
# - 'modified': same but `switch` complexity is always 1, not NUM of `case`
max-depth [NUM] #Max block nesting (def: 4)
max-nested-callbacks [NUM] #Max nested callback depth (def: 10)
┌─────────────────┐
│ REFERENCING │
└─────────────────┘
no-undef [OBJ] #Avoid referencing undeclared variables
#Exceptions: global variables (see above on how to declare them)
#OBJ: typeof BOOL: if false (def), ignore typeof VAR
no-undef-init #Avoid explicitely assigning undefined at initialization
no-unused-vars [OBJ] #Avoid unused variables
#Exceptions:
# - mentioned in /* exported VAR,... */ comment
# - providing it is not CommonJS module or ES module
#OBJ:
# - vars STR: 'all' (def, check all) or 'local' (does not check global variables)
# - varsIgnorePattern 'REGEXP': ignore if name matches
# - reportUsedIgnorePattern BOOL (def: false): do not allow using variables matching vargsIgnorePattern
# - args STR: 'all' (check all), 'none' or 'after-used' (def, only last positional argument)
# - argsIgnorePattern 'REGEXP': ignore if name matches
# - destructuredArrayIgnorePattern 'REGEXP': ignore if name matches
# - ignoreRestSiblings BOOL (def: false): do not check ...ARG
# - ignoreClassWithStaticInitBlock BOOL (def: false): do not check CLASS with static blocks
# - caughtErrors 'all' (def) or 'none', caughtErrorsPattern 'REGEXP': same but for catch clause arg
unicorn/no-unused-properties #Avoid unused object properties
no-redeclare [OBJ] #Avoid declaring twice same VAR with var
#OBJ:
# - builtinGlobals BOOL (def: true): also avoid redeclaring builtin global vars
no-shadow [OBJ] #Disallow inner scopes declaring variables with same name as outer scope
#OBJ:
# - builtinGlobals BOOL (def: false): including builtin global variables (e.g. Number)
# - hoist STR: check through hoisting of:
# - 'never'
# - 'functions' (def)
# - 'all': functions + variables
# - allow 'VAR'_ARR: whitelists
# - ignoreOnInitialization BOOL (def: false): allow when shadowed variable is part of the
# same statement and it is a declaration
no-shadow-restricted-names #Avoid variables named NaN, Infinity, undefined, eval or arguments
no-use-before-define [OBJ] #Avoid hoisting
#OBJ:
# - functions|classes|variables BOOL (def: true)
# - allowNamedExports BOOL (def: false): allow named exports to reference hoisted variables
┌──────────────────┐
│ DECLARATIONS │
└──────────────────┘