File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 'use strict ';
1+ import { run } from 'madrun ';
22
3- const { run} = require ( 'madrun' ) ;
4-
5- module . exports = {
3+ export default {
64 'lint' : ( ) => 'putout .' ,
75 'fix:lint' : ( ) => run ( 'lint' , '--fix' ) ,
8- 'report' : ( ) => 'c8 report --reporter=text- lcov | coveralls ' ,
6+ 'report' : ( ) => 'c8 report --reporter=lcov' ,
97 'coverage' : ( ) => 'c8 npm test' ,
108 'test' : ( ) => 'tape test/*.js' ,
119 'watch:coverage' : ( ) => run ( 'watcher' , 'npm run coverage' ) ,
Original file line number Diff line number Diff line change 1- 'use strict ';
1+ import { safeAlign } from 'eslint-plugin-putout ';
22
3- const { safeAlign} = require ( 'eslint-plugin-putout' ) ;
4-
5- module . exports = safeAlign ;
3+ export default safeAlign ;
Original file line number Diff line number Diff line change 1- 'use strict' ;
1+ import format from 'format-io' ;
2+ import shortdate from 'shortdate' ;
23
3- const format = require ( 'format-io' ) ;
4- const shortdate = require ( 'shortdate' ) ;
5-
6- module . exports = ( files ) => {
4+ export default ( files ) => {
75 check ( files ) ;
86
97 return files
Original file line number Diff line number Diff line change 11{
22 "name" : " @cloudcmd/formatify" ,
33 "version" : " 2.0.1" ,
4- "type" : " commonjs " ,
4+ "type" : " module " ,
55 "author" : " coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)" ,
66 "description" : " format directory content" ,
77 "homepage" : " http://github.com/cloudcmd/formatify" ,
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
31const date = new Date ( '2017-01-12T09:01:35.288Z' ) ;
42
5- module . exports . sortifyRaw = {
3+ export const sortifyRaw = {
64 name : 'sortify.js' ,
75 size : 3538 ,
86 date,
97 owner : 0 ,
108 mode : 33_204 ,
119} ;
1210
13- module . exports . testRaw = {
11+ export const testRaw = {
1412 name : 'test' ,
1513 size : 'dir' ,
1614 date,
1715 owner : 0 ,
1816 mode : 33_204 ,
1917} ;
2018
21- module . exports . readifyRaw = {
19+ export const readifyRaw = {
2220 name : 'readify.js' ,
2321 size : 1629 ,
2422 date,
2523 owner : 0 ,
2624 mode : 33_204 ,
2725} ;
2826
29- module . exports . libRaw = {
27+ export const libRaw = {
3028 name : 'lib' ,
3129 size : 'dir' ,
3230 date : 0 ,
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
3- module . exports . sortifyFile = {
1+ export const sortifyFile = {
42 name : 'sortify.js' ,
53 size : '3.46kb' ,
64 date : '12.01.2017' ,
75 owner : 0 ,
86 mode : 'rw- rw- r--' ,
97} ;
108
11- module . exports . testDir = {
9+ export const testDir = {
1210 name : 'test' ,
1311 size : 'dir' ,
1412 date : '12.01.2017' ,
1513 owner : 0 ,
1614 mode : 'rw- rw- r--' ,
1715} ;
1816
19- module . exports . readifyFile = {
17+ export const readifyFile = {
2018 name : 'readify.js' ,
2119 size : '1.59kb' ,
2220 date : '12.01.2017' ,
2321 owner : 0 ,
2422 mode : 'rw- rw- r--' ,
2523} ;
2624
27- module . exports . libDir = {
25+ export const libDir = {
2826 name : 'lib' ,
2927 size : 'dir' ,
3028 date : '' ,
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
3- const { tryCatch} = require ( 'try-catch' ) ;
4-
5- const { test} = require ( 'supertape' ) ;
6- const formatify = require ( '..' ) ;
7-
8- const {
1+ import { tryCatch } from 'try-catch' ;
2+ import { test } from 'supertape' ;
3+ import formatify from '../lib/formatify.js' ;
4+ import {
95 testDir ,
106 libDir ,
117 readifyFile ,
128 sortifyFile ,
13- } = require ( './fixture' ) ;
14-
15- const {
9+ } from './fixture.js' ;
10+ import {
1611 testRaw ,
1712 libRaw ,
1813 readifyRaw ,
1914 sortifyRaw ,
20- } = require ( './fixture-raw' ) ;
15+ } from './fixture-raw.js' ;
2116
2217test ( 'formatify: arguments: exception when no files' , ( t ) => {
2318 const [ error ] = tryCatch ( formatify ) ;
You can’t perform that action at this time.
0 commit comments