Skip to content

Instantly share code, notes, and snippets.

@konjag
Created March 25, 2019 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konjag/0d460bd5f6efc1c2d20fc205e1f0f9a1 to your computer and use it in GitHub Desktop.
Save konjag/0d460bd5f6efc1c2d20fc205e1f0f9a1 to your computer and use it in GitHub Desktop.
Example code to test linting.
import 'whatwg-fetch';
import foo from './foo';
var a = 1;
var b = 2;
a = 5;
const inbox = [{
id: 1,
subject: 'Mockingbird',
}, {
id: 2,
subject: 'Foo',
}, {
id: 3,
subject: 'Bar',
}];
const messages = [...inbox].filter((msg) => {
const { subject, author } = msg;
if (subject === 'Mockingbird') {
return author === 'Harper Lee';
} else {
return false;
}
});
function run() {
console.log(messages, a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment