Skip to content

Commit

Permalink
fix(types): prettier (#57)
Browse files Browse the repository at this point in the history
* fix(types): prettier

* refactor(prettier): update tests and types
  • Loading branch information
sambacha authored Jun 26, 2022
1 parent 35017d8 commit a4124c4
Show file tree
Hide file tree
Showing 26 changed files with 7,700 additions and 26,099 deletions.
13 changes: 7 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
test_validate/**/*
test_validate/**
jest-test.sh
tests_config/
.github/
test/
tests/
test/**
tests/**
__snapshots__
jest.config.js
renovate.json
test_config/
__tests__
.eslint*
!src/*.js
**/__mocks__/**
**/__tests__/**
**/examples/**
**/tasks/**
coverage/
coverage/**
scripts/**
codecov.yml
index.spec.js
tsconfig.json
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ coverage/
tests/format/**/*.sol
tests/format/RespectDefaultOptions/respect-default-options.js
src/prettier-comments/**/*.js

77 changes: 0 additions & 77 deletions dist/.editorconfig

This file was deleted.

25 changes: 0 additions & 25 deletions dist/index.d.ts

This file was deleted.

38 changes: 0 additions & 38 deletions dist/index.js

This file was deleted.

13 changes: 11 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */

const path = require("path");

const FULL_TEST = Boolean(process.env.FULL_TEST);
// jest.config.js
const { defaults } = require('jest-config');

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

const ENABLE_COVERAGE = !!process.env.CI;
// Throw errors when a `console.error` or `console.warn` happens
// by overriding the functions
/* by overriding the functions
CONSOLE_FAIL_TYPES.forEach((type) => {
console[type] = (message) => {
throw new VError.errorFromList(
`Failing due to console.${type} while running test!\n\n${message}`,
);
};
});
*/
module.exports = {
collectCoverage: FULL_TEST,
collectCoverageFrom: [
Expand All @@ -36,14 +41,18 @@ module.exports = {
},
},
setupFiles: ['<rootDir>/tests/config/setup.js'],
snapshotFormat: {
escapeString: false,
printBasicPrototype: false,
},
snapshotSerializers: [
'jest-snapshot-serializer-raw',
'jest-snapshot-serializer-ansi',
],
testTimeout: 12500,
testEnvironment: 'node',
coverageReporters: ["text", "lcov"],
testRegex: 'jsfmt\\.spec\\.js$|tests/unit/.*\\.js$',
transform: {},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
Expand Down
Loading

0 comments on commit a4124c4

Please sign in to comment.