Add sucrase support
This commit is contained in:
2
dist/package.json
vendored
2
dist/package.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@aet/eslint-rules",
|
"name": "@aet/eslint-rules",
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": "^8.53.0",
|
"eslint": "^8.53.0",
|
||||||
|
14
src/index.ts
14
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({
|
export function extendConfig({
|
||||||
plugins,
|
plugins,
|
||||||
settings,
|
settings,
|
||||||
@ -73,7 +79,13 @@ export function extendConfig({
|
|||||||
},
|
},
|
||||||
overrides: [
|
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'],
|
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@ tryRequire([
|
|||||||
'esbuild-register',
|
'esbuild-register',
|
||||||
'ts-node/register/transpile-only',
|
'ts-node/register/transpile-only',
|
||||||
'@swc/register',
|
'@swc/register',
|
||||||
|
'sucrase/register',
|
||||||
'@babel/register',
|
'@babel/register',
|
||||||
'coffeescript/register',
|
'coffeescript/register',
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user