Skip to content

Commit

Permalink
module.exports + export const rule
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Aug 26, 2022
1 parent 5b495ea commit c252862
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/eslint-plugin-next/lib/rules/no-img-element.ts
Expand Up @@ -2,7 +2,7 @@ import type { Rule } from 'eslint'

const url = 'https://nextjs.org/docs/messages/no-img-element'

const rule: Rule.RuleModule = {
export const rule: Rule.RuleModule = {
meta: {
docs: {
description: 'Prevent usage of `<img>` element to prevent layout shift.',
Expand Down Expand Up @@ -37,5 +37,4 @@ const rule: Rule.RuleModule = {
},
}

export default rule
module.exports = rule
2 changes: 1 addition & 1 deletion test/unit/eslint-plugin-next/no-img-element.test.ts
@@ -1,4 +1,4 @@
import rule from '@next/eslint-plugin-next/lib/rules/no-img-element'
import { rule } from '@next/eslint-plugin-next/lib/rules/no-img-element'
import { RuleTester } from 'eslint'
;(RuleTester as any).setDefaultConfig({
parserOptions: {
Expand Down

0 comments on commit c252862

Please sign in to comment.