Skip to content

Commit

Permalink
fix: make config cjs
Browse files Browse the repository at this point in the history
eslint plugins cannot be ESM apparently :)
  • Loading branch information
tusbar committed Sep 8, 2021
1 parent 34fa877 commit 5d339b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions index.js → index.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const config = {
module.exports = {
extends: [
'xo-react',
'plugin:@next/next/recommended',
Expand Down Expand Up @@ -100,5 +100,3 @@ const config = {
'unicorn/prefer-module': 'off',
},
}

export default config
2 changes: 1 addition & 1 deletion lib/lint-fixture.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path'
import xo from 'xo'

import config from '..'
import config from '../index.cjs'

const fixturesPath = path.join('__tests__', '__fixtures__')

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eslint-config-xo-nextjs",
"version": "4.0.0",
"description": "ESLint shareable config for Next.js to be used with eslint-config-xo",
"main": "index.js",
"main": "index.cjs",
"repository": "[email protected]:tusbar/eslint-config-xo-nextjs.git",
"author": "Bertrand Marron",
"license": "MIT",
Expand All @@ -14,7 +14,7 @@
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
},
"files": [
"index.js"
"index.cjs"
],
"keywords": [
"react",
Expand Down

0 comments on commit 5d339b7

Please sign in to comment.