Skip to content

Commit

Permalink
Remove CommonJS exports
Browse files Browse the repository at this point in the history
  • Loading branch information
k15a committed Mar 1, 2017
1 parent 76f1b84 commit 0de28bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
4 changes: 0 additions & 4 deletions src/rules/exports-last.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ function isExportStatement({ type }) {
// ES Module export statements
if (type === 'ExportDefaultDeclaration' || type === 'ExportNamedDeclaration') {
return true

// CommonJS export statements
} else if (type === 'ExpressionStatement') {
// TODO
}

return false
Expand Down
27 changes: 0 additions & 27 deletions tests/src/rules/exports-last.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ ruleTester.run('exports-last', rule, {
export const bar = true;
`,
}),
// test({
// code: `
// const foo = 'bar';
// module.exports = foo
// `,
// }),
// test({
// code: `
// const foo = 'bar';
// module.exports = foo;
// exports.bar = true
// `,
// }),

],
invalid: [
Expand All @@ -64,19 +51,5 @@ ruleTester.run('exports-last', rule, {
`,
errors,
}),
// test({
// code: `
// module.exports = 'bar';
// console.log('hi');
// `,
// errors,
// }),
// test({
// code: `
// exports.foo = 'bar';
// const bar = true;
// `,
// errors,
// }),
],
})

0 comments on commit 0de28bd

Please sign in to comment.