Skip to content

Commit

Permalink
Permit files to have a single named export (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
billyjanitsch authored Mar 23, 2023
1 parent bf11372 commit 26acb4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
12 changes: 1 addition & 11 deletions __snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,7 @@ exports[`lints all fixtures: prop-types.tsx 1`] = `
]
`;

exports[`lints all fixtures: syntax.tsx 1`] = `
[
{
"column": 1,
"line": 1,
"message": "Prefer default export on a file with single export.",
"rule": "import/prefer-default-export",
"severity": 2,
},
]
`;
exports[`lints all fixtures: syntax.tsx 1`] = `[]`;

exports[`lints all fixtures: ts-exports.ts 1`] = `[]`;

Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module.exports = {
'import/named': 2,
'import/namespace': [2, {allowComputed: true}],

// allow files with a single named export
'import/prefer-default-export': 0,

// allow extensionless imports of TS files
'import/extensions': [
2,
Expand Down

0 comments on commit 26acb4c

Please sign in to comment.