Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint: re-enable 'jest/valid-title' rule #76

Merged
merged 2 commits into from Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -297,7 +297,7 @@ Object {
"jest/valid-describe": 2,
"jest/valid-expect": 2,
"jest/valid-expect-in-promise": 2,
"jest/valid-title": 0,
"jest/valid-title": 1,
"jsx-a11y/accessible-emoji": 2,
"jsx-a11y/alt-text": 2,
"jsx-a11y/anchor-has-content": 0,
Expand Down Expand Up @@ -913,6 +913,11 @@ Snapshot Diff:
- "jest/prefer-hooks-on-top": 1,
+ "jest/prefer-hooks-on-top": 2,
"jest/prefer-inline-snapshots": 0,
@@ --- --- @@
"jest/valid-expect-in-promise": 2,
- "jest/valid-title": 1,
+ "jest/valid-title": 2,
"jsx-a11y/accessible-emoji": 2,
@@ --- --- @@
"no-implied-eval": 2,
- "no-import-assign": 1,
Expand Down
2 changes: 1 addition & 1 deletion src/eslint-config-adeira/ourRules.js
Expand Up @@ -319,7 +319,7 @@ module.exports = {
'jest/valid-describe': ERROR,
'jest/valid-expect': ERROR,
'jest/valid-expect-in-promise': ERROR,
'jest/valid-title': OFF, // See: https://github.com/jest-community/eslint-plugin-jest/issues/470
'jest/valid-title': NEXT_VERSION_ERROR,

// prefer-object-spread (https://github.com/bryanrsmith/eslint-plugin-prefer-object-spread)
'prefer-object-spread/prefer-object-spread': WARN,
Expand Down
2 changes: 1 addition & 1 deletion src/monorepo-scanner/src/scans/Babel.scan.js
Expand Up @@ -9,7 +9,7 @@ Workspaces.iterateWorkspaces(packageJSONLocation => {
const packageJSON = require(packageJSONLocation);
const workspacePath = path.dirname(packageJSONLocation);

test(packageJSON.name, () => {
test(`${packageJSON.name}`, () => {
expect(fs.existsSync(path.join(workspacePath, '.babelrc')) === false).toGiveHelp(
`Your workspace ${packageJSON.name} contains file '.babelrc' but it should have '.babelrc.js' file instead.`,
);
Expand Down
2 changes: 1 addition & 1 deletion src/monorepo-scanner/src/scans/Changelogs.DISABLED.js
Expand Up @@ -15,7 +15,7 @@ Workspaces.iterateWorkspaces(packageJSONLocation => {

if (semver.gte(packageJson.version, '1.1.0')) {
const changelogPath = path.join(packagePath, 'CHANGELOG.md');
test(changelogPath, () => {
test(`${changelogPath}`, () => {
expect(fs.existsSync(changelogPath) === true).toGiveHelp(
`Changelog doesn't exist: ${changelogPath}`,
);
Expand Down
2 changes: 1 addition & 1 deletion src/monorepo-scanner/src/scans/NextjsApplications.scan.js
Expand Up @@ -16,7 +16,7 @@ Workspaces.iterateWorkspaces(packageJSONLocation => {
const babelRCFile = '.babelrc.js';
const babelRCLocation = path.join(workspaceLocation, babelRCFile);

test(babelRCLocation, () => {
test(`${babelRCLocation}`, () => {
expect(fs.existsSync(babelRCLocation)).toGiveHelp(
`Your Next.js application ${appName} should contain '${babelRCFile}' file in the workspace root.`,
);
Expand Down
2 changes: 1 addition & 1 deletion src/monorepo-scanner/src/scans/Workspaces.scan.js
Expand Up @@ -5,7 +5,7 @@ import path from 'path';
import { Workspaces } from '@adeira/monorepo-utils';

Workspaces.iterateWorkspaces(packageJSONLocation => {
test(packageJSONLocation, () => {
test(`${packageJSONLocation}`, () => {
// $FlowAllowDynamicImport
const packageJson = require(packageJSONLocation);
expect(packageJson.private).not.toBeUndefined();
Expand Down
Expand Up @@ -42,7 +42,7 @@ const exceptions = new Map([

describe('dependencies similarities', () => {
Workspaces.iterateWorkspaces(packageJSONLocation => {
test(packageJSONLocation, done => {
test(`${packageJSONLocation}`, done => {
// $FlowAllowDynamicImport
const packageJson = require(packageJSONLocation);
const dependencies = Object.keys(packageJson.dependencies || {});
Expand Down