Skip to content

Commit a4124c4

Browse files
authored
fix(types): prettier (#57)
* fix(types): prettier * refactor(prettier): update tests and types
1 parent 35017d8 commit a4124c4

26 files changed

Lines changed: 7700 additions & 26099 deletions

.npmignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
test_validate/**/*
1+
test_validate/**
22
jest-test.sh
33
tests_config/
44
.github/
5-
test/
6-
tests/
5+
test/**
6+
tests/**
77
__snapshots__
88
jest.config.js
99
renovate.json
10-
test_config/
1110
__tests__
1211
.eslint*
13-
!src/*.js
1412
**/__mocks__/**
1513
**/__tests__/**
1614
**/examples/**
1715
**/tasks/**
18-
coverage/
16+
coverage/**
1917
scripts/**
18+
codecov.yml
19+
index.spec.js
20+
tsconfig.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ coverage/
1010
tests/format/**/*.sol
1111
tests/format/RespectDefaultOptions/respect-default-options.js
1212
src/prettier-comments/**/*.js
13+

dist/.editorconfig

Lines changed: 0 additions & 77 deletions
This file was deleted.

dist/index.d.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

dist/index.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

jest.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2+
3+
const path = require("path");
4+
25
const FULL_TEST = Boolean(process.env.FULL_TEST);
36
// jest.config.js
47
const { defaults } = require('jest-config');
58

69
const CONSOLE_FAIL_TYPES = ['error', 'warn'];
710

11+
const ENABLE_COVERAGE = !!process.env.CI;
812
// Throw errors when a `console.error` or `console.warn` happens
9-
// by overriding the functions
13+
/* by overriding the functions
1014
CONSOLE_FAIL_TYPES.forEach((type) => {
1115
console[type] = (message) => {
1216
throw new VError.errorFromList(
1317
`Failing due to console.${type} while running test!\n\n${message}`,
1418
);
1519
};
1620
});
21+
*/
1722
module.exports = {
1823
collectCoverage: FULL_TEST,
1924
collectCoverageFrom: [
@@ -36,14 +41,18 @@ module.exports = {
3641
},
3742
},
3843
setupFiles: ['<rootDir>/tests/config/setup.js'],
44+
snapshotFormat: {
45+
escapeString: false,
46+
printBasicPrototype: false,
47+
},
3948
snapshotSerializers: [
4049
'jest-snapshot-serializer-raw',
4150
'jest-snapshot-serializer-ansi',
4251
],
4352
testTimeout: 12500,
4453
testEnvironment: 'node',
54+
coverageReporters: ["text", "lcov"],
4555
testRegex: 'jsfmt\\.spec\\.js$|tests/unit/.*\\.js$',
46-
transform: {},
4756
watchPlugins: [
4857
'jest-watch-typeahead/filename',
4958
'jest-watch-typeahead/testname',

0 commit comments

Comments
 (0)