Skip to content

Commit

Permalink
chore: run prettier using eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 7, 2020
1 parent 0f09ca4 commit 2928bb7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Expand Up @@ -245,7 +245,7 @@ module.exports = {
'**/__tests__/**',
'**/__performance_tests__/**',
'packages/diff-sequences/perf/index.js',
'packages/pretty-format/perf/test.js'
'packages/pretty-format/perf/test.js',
],
rules: {
'import/no-unresolved': 'off',
Expand All @@ -258,7 +258,7 @@ module.exports = {
parserOptions: {
sourceType: 'module',
},
plugins: ['markdown', 'import', 'jest'],
plugins: ['markdown', 'import', 'jest', 'prettier'],
rules: {
'accessor-pairs': ['warn', {setWithoutGet: true}],
'block-scoped-var': 'off',
Expand Down Expand Up @@ -442,6 +442,7 @@ module.exports = {
'prefer-arrow-callback': ['error', {allowNamedFunctions: true}],
'prefer-const': 'error',
'prefer-template': 'off',
'prettier/prettier': 'error',
quotes: [
'error',
'single',
Expand Down
10 changes: 5 additions & 5 deletions packages/jest-haste-map/src/watchers/common.js
Expand Up @@ -27,7 +27,7 @@ exports.ALL_EVENT = 'all';
* @public
*/

exports.assignOptions = function(watcher, opts) {
exports.assignOptions = function (watcher, opts) {
opts = opts || {};
watcher.globs = opts.glob || [];
watcher.dot = opts.dot || false;
Expand Down Expand Up @@ -56,12 +56,12 @@ exports.assignOptions = function(watcher, opts) {
* @public
*/

exports.isFileIncluded = function(globs, dot, doIgnore, relativePath) {
exports.isFileIncluded = function (globs, dot, doIgnore, relativePath) {
if (doIgnore(relativePath)) {
return false;
}
return globs.length
? micromatch.some(relativePath, globs, { dot })
? micromatch.some(relativePath, globs, {dot})
: dot || micromatch.some(relativePath, '**/*');
};

Expand All @@ -76,13 +76,13 @@ exports.isFileIncluded = function(globs, dot, doIgnore, relativePath) {
* @public
*/

exports.recReaddir = function(
exports.recReaddir = function (
dir,
dirCallback,
fileCallback,
endCallback,
errorCallback,
ignored
ignored,
) {
walker(dir)
.filterDir(currentDir => !anymatch(ignored, currentDir))
Expand Down
Expand Up @@ -779,8 +779,8 @@ describe('ScriptTransformer', () => {

scriptTransformer.transform(fileName2, getCoverageOptions());

expect(testPreprocessor.getCacheKey.mock.calls[0][2].cacheFS).toBeDefined()
expect(testPreprocessor.process.mock.calls[0][2].cacheFS).toBeDefined()
expect(testPreprocessor.getCacheKey.mock.calls[0][2].cacheFS).toBeDefined();
expect(testPreprocessor.process.mock.calls[0][2].cacheFS).toBeDefined();
expect(fs.readFileSync).toHaveBeenCalledTimes(1);
expect(fs.readFileSync).toBeCalledWith(fileName1, 'utf8');
});
Expand Down

0 comments on commit 2928bb7

Please sign in to comment.