Skip to content

Commit

Permalink
Merge branch 'feature/white-list-snapshots' of github.com:benmonro/es…
Browse files Browse the repository at this point in the history
…lint-plugin-jest into feature/white-list-snapshots
  • Loading branch information
Ben Monro committed Jul 8, 2019
2 parents 3a8934d + be49880 commit b3a3b63
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/rules/no-large-snapshots.md
Expand Up @@ -114,7 +114,7 @@ In an `eslintrc` file:
In addition there is an option for whitelisting large snapshot files. Since
`//eslint` comments will be removed when a `.snap` file is updated, this option
provides a way of whitelisting large snapshots. The list of whitelistedSnapshots
is keyed first on the absolute filepath of the snapshot file. You can then
is keyed first on the relative filepath of the snapshot file. You can then
provide an array of strings to match the snapshot names against. If you're using
a `.eslintrc.js` file, you can use regular expressions AND strings.

Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "eslint-plugin-jest",
"name": "eslint-plugin-jestx",
"version": "0.0.0-development",
"description": "Eslint rules for Jest",
"repository": "jest-community/eslint-plugin-jest",
"repository": "benmonro/eslint-plugin-jest",
"license": "MIT",
"keywords": [
"eslint",
Expand Down
4 changes: 2 additions & 2 deletions src/processors/__tests__/snapshot-processor.test.js
Expand Up @@ -27,11 +27,11 @@ describe('snapshot-processor', () => {
[
{ ruleId: 'no-console' },
{ ruleId: 'global-require' },
{ ruleId: 'jest/no-large-snapshots' },
{ ruleId: 'jestx/no-large-snapshots' },
],
]);

expect(result).toEqual([{ ruleId: 'jest/no-large-snapshots' }]);
expect(result).toEqual([{ ruleId: 'jestx/no-large-snapshots' }]);
});
});
});
2 changes: 1 addition & 1 deletion src/processors/snapshot-processor.js
Expand Up @@ -6,7 +6,7 @@ const preprocess = source => [source];
const postprocess = messages =>
messages[0].filter(
// snapshot files should only be linted with snapshot specific rules
message => message.ruleId === 'jest/no-large-snapshots',
message => message.ruleId === 'jestx/no-large-snapshots',
);

module.exports = {
Expand Down
1 change: 0 additions & 1 deletion src/rules/no-large-snapshots.js
@@ -1,5 +1,4 @@
'use strict';

const { getDocsUrl, getStringValue } = require('./util');

const reportOnViolation = (context, node) => {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/util.js
Expand Up @@ -3,7 +3,7 @@
const path = require('path');
const { version } = require('../../package.json');

const REPO_URL = 'https://github.com/jest-community/eslint-plugin-jest';
const REPO_URL = 'https://github.com/benmonro/eslint-plugin-jest';

const expectCase = node =>
node.callee.name === 'expect' &&
Expand Down

0 comments on commit b3a3b63

Please sign in to comment.