Skip to content

Commit

Permalink
fix: fix module import resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Oct 17, 2024
1 parent 29b45db commit db4f59c
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/extensions */
import { init } from './src/index.js';

export default init(
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"postpublish": "pinst --enable",
"pre-commit": "npm run test && lint-staged"
},
"main": "src/index.js",
"module": "src/index.js",
"main": "./src/index.js",
"module": "./src/index.js",
"type": "module",
"dependencies": {
"@eslint-react/eslint-plugin": "1.15.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { compose } from './utils/compose.js';

const testPackages = ['jest', 'vitest', 'cypress', 'playwright'];

/** @type {import('./index.js').Options} */
/** @type {import('./option.js').Options} */
const defaultOptions = {
cypress: isPackageExists('cypress'),
disableExpensiveRules: false,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/functional.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import plugin from 'eslint-plugin-functional';

/**
* @param { import('..').Options } options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
function fp() {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const jsExtensions = ['.mjs', '.js', '.jsx', '.cjs'];
const allExtensions = [...jsExtensions, ...tsExtensions];

/**
* @param { import('../index.js').Options } options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
function imports(options = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import plugin from 'eslint-plugin-jest';
import { globs } from '../utils/globs.js';

/**
* @param { import('../index.d.ts').Options } options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config } */
function jest() {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import plugin from 'eslint-plugin-n';
import { strict } from '../utils/conditions.js';

/**
* @param { import('../index').Options } options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
function node(options = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { predicate } from '../utils/conditions.js';
import { globs } from '../utils/globs.js';

/**
* @param {import('../index.js').Options} options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
function tests(options = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { globs } from '../utils/globs.js';
import { namingConvention } from '../utils/naming-convention.js';

/**
* @param {import('../index.js').Options} options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
function typescript(options = {}) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/utils/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ignoreGlobs } from './globs.js';

/**
* @param { (options: import('eslint').Linter.Config) => import('eslint').Linter.Config } module
* @param { import('../index.js').Options } options
* @param { import('../option').Options } options
* @return { import('eslint').Linter.Config }
*/
export function compose(module, options) {
Expand Down

0 comments on commit db4f59c

Please sign in to comment.