-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove an empty line! #634
Conversation
@peterp how make the CI pass? |
Hi @guledali! Thanks for this. Is the reason for making this change because the generated file is throwing an ESLint error right away? For reference, here's the CI test error: @redwoodjs/cli: -
@redwoodjs/cli: import Posts from 'src/components/Posts'
@redwoodjs/cli: export const QUERY = gql`
@redwoodjs/cli: query POSTS {
@redwoodjs/cli: posts {
@redwoodjs/cli:
@redwoodjs/cli: 109 | expect(
@redwoodjs/cli: 110 | files['/path/to/project/web/src/components/PostsCell/PostsCell.js']
@redwoodjs/cli: > 111 | ).toEqual(
@redwoodjs/cli: | ^
@redwoodjs/cli: 112 | loadGeneratorFixture('scaffold', path.join('components', 'indexCell.js'))
@redwoodjs/cli: 113 | )
@redwoodjs/cli: 114 | })
@redwoodjs/cli:
@redwoodjs/cli: at Object.<anonymous> (src/commands/generate/scaffold/__tests__/scaffold.test.js:111:5) @cannikin looks like we might need your help here -- I've no idea why removing the empty line would break a path in the test? |
That's looking at the content of the file that's generated and comparing it against the fixture file. So if the generated file now has one less line break it won't match the fixture. We used to have an eslint rule that put empty lines between imports from packages and imports from other paths in the app itself...did those rules get changed? I had that empty line in there so there wouldn't be any changes between what came out of the generator and what the linter would fix if you went into the file and saved it yourself... |
Ahh interesting. Is this the only generated file that has that empty line? |
@cannikin Just checked that's the only file |
Awesome! You'll just have to update the text fixture for that file and remove the newline from that as well. Locally you can |
@jtoar, I'm closing this one, not much of change anyway and + new templates are coming soon #686 (comment) |
No description provided.