diff --git a/dist/package.json b/dist/package.json index 6cfcbe6..5bc268e 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@aet/eslint-rules", - "version": "0.0.2", + "version": "0.0.3", "license": "UNLICENSED", "peerDependencies": { "eslint": "^8.53.0", diff --git a/src/index.ts b/src/index.ts index 966d7e5..0f551bb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,6 +20,12 @@ declare module 'eslint-define-config/src/rules/react/no-unknown-property.d.ts' { } } +/** + * Returns a ESLint config object. + * + * By default, it includes `["@typescript-eslint", "import", "prettier"]` configs. + * Additional bundled plugins include `["react", "react-refresh", "jsx-a11y", "unicorn"]`. + */ export function extendConfig({ plugins, settings, @@ -73,7 +79,13 @@ export function extendConfig({ }, overrides: [ { - files: ['.eslintrc.js', '*.config.js', 'index.js', 'babel.config.js'], + files: [ + '.eslintrc.js', + '*.config.js', + 'index.js', + 'babel.config.js', + 'next.config.js', + ], extends: ['plugin:@typescript-eslint/disable-type-checked'], }, { diff --git a/src/local/index.ts b/src/local/index.ts index 9813364..593f654 100644 --- a/src/local/index.ts +++ b/src/local/index.ts @@ -17,6 +17,7 @@ tryRequire([ 'esbuild-register', 'ts-node/register/transpile-only', '@swc/register', + 'sucrase/register', '@babel/register', 'coffeescript/register', ]);