Update
This commit is contained in:
13
src/index.ts
13
src/index.ts
@ -10,8 +10,9 @@ import { importTypeScript } from './presets/typescript';
|
||||
import { unicorn } from './presets/unicorn';
|
||||
import { eslintRules } from './presets/eslint';
|
||||
import { custom } from './presets/custom';
|
||||
import { error, warn, off } from './constants';
|
||||
import { off } from './constants';
|
||||
import { checkEnv } from './env';
|
||||
import { stylistic } from './presets/stylistic';
|
||||
|
||||
export { graphql } from './presets/graphql';
|
||||
export { jsdoc } from './presets/jsdoc';
|
||||
@ -19,7 +20,7 @@ export { storybook } from './presets/misc';
|
||||
export { react, reactRefresh } from './presets/react';
|
||||
export { tailwind } from './presets/tailwind';
|
||||
|
||||
export { error, warn, off };
|
||||
export { error, warn, off } from './constants';
|
||||
|
||||
declare global {
|
||||
interface Array<T> {
|
||||
@ -103,6 +104,9 @@ export type InputConfig = Omit<ESLintConfig, 'rules'> & {
|
||||
*
|
||||
* Non bundled:
|
||||
* 1. [`graphql`](https://the-guild.dev/graphql/eslint/rules)
|
||||
*
|
||||
* @param of Configuration options.
|
||||
* @returns ESLint configuration object.
|
||||
*/
|
||||
export function extendConfig(
|
||||
of: InputConfig & {
|
||||
@ -124,8 +128,8 @@ export function extendConfig(
|
||||
...rest
|
||||
} = of;
|
||||
|
||||
let plugins: Plugin[] = [..._plugins];
|
||||
let extend: Extends[] = ensureArray(_extends);
|
||||
const plugins: Plugin[] = [..._plugins];
|
||||
const extend: Extends[] = ensureArray(_extends);
|
||||
|
||||
if (customRuleFiles != null) {
|
||||
plugins.push('local');
|
||||
@ -135,6 +139,7 @@ export function extendConfig(
|
||||
importTypeScript,
|
||||
unicorn,
|
||||
custom,
|
||||
stylistic,
|
||||
...(auto ? checkEnv() : []),
|
||||
..._middlewares,
|
||||
]);
|
||||
|
Reference in New Issue
Block a user