File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {toString} from 'nlcst-to-string'
13
13
* @param {NormalizeOptions } [options={}]
14
14
*/
15
15
export function normalize ( node , options ) {
16
- var value = ( typeof node === 'string' ? node : toString ( node ) )
16
+ let value = ( typeof node === 'string' ? node : toString ( node ) )
17
17
. toLowerCase ( )
18
18
. replace ( / ’ / g, "'" )
19
19
Original file line number Diff line number Diff line change 62
62
"trailingComma" : " none"
63
63
},
64
64
"xo" : {
65
- "prettier" : true ,
66
- "rules" : {
67
- "no-var" : " off" ,
68
- "prefer-arrow-callback" : " off"
69
- }
65
+ "prettier" : true
70
66
},
71
67
"remarkConfig" : {
72
68
"plugins" : [
Original file line number Diff line number Diff line change 6
6
import test from 'tape'
7
7
import { normalize } from './index.js'
8
8
9
- test ( 'Basic' , function ( t ) {
10
- t . throws ( function ( ) {
9
+ test ( 'Basic' , ( t ) => {
10
+ t . throws ( ( ) => {
11
11
// @ts -ignore runtime.
12
12
normalize ( true )
13
13
} , 'should fail when given a boolean' )
14
14
15
15
t . end ( )
16
16
} )
17
17
18
- test ( 'Case' , function ( t ) {
18
+ test ( 'Case' , ( t ) => {
19
19
t . equal ( normalize ( 'Dont' ) , 'dont' , 'should normalize case (string)' )
20
20
21
21
t . equal (
@@ -44,7 +44,7 @@ test('Case', function (t) {
44
44
t . end ( )
45
45
} )
46
46
47
- test ( 'Apostrophes' , function ( t ) {
47
+ test ( 'Apostrophes' , ( t ) => {
48
48
t . equal (
49
49
normalize ( "Don't Block-Level" ) ,
50
50
'dont blocklevel' ,
@@ -290,7 +290,7 @@ test('Apostrophes', function (t) {
290
290
t . end ( )
291
291
} )
292
292
293
- test ( 'Dashes' , function ( t ) {
293
+ test ( 'Dashes' , ( t ) => {
294
294
t . equal (
295
295
normalize ( "Don't Block-Level" ) ,
296
296
'dont blocklevel' ,
You can’t perform that action at this time.
0 commit comments