Skip to content

Commit 69a4911

Browse files
authored
Merge pull request #36 from aligent/fix/eslint-configs-base-export
fix: eslintConfigs should have a 'base' property
2 parents 98e6bc2 + 5a0e1c5 commit 69a4911

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/index.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import reactPlugin from 'eslint-plugin-react';
66
import hooksPlugin from 'eslint-plugin-react-hooks';
77
import tsEslint from 'typescript-eslint';
88

9-
const core = [
9+
const base = [
1010
eslint.configs.recommended,
1111
...tsEslint.configs.recommended,
1212
eslintPluginPrettier,
@@ -43,7 +43,7 @@ const core = [
4343
];
4444

4545
const react = [
46-
...core,
46+
...base,
4747
reactPlugin.configs.flat.recommended,
4848
jsxA11yPlugin.flatConfigs.recommended,
4949
// `react-hooks` plugin doesn't support "flat configs" yet so it has to be wrapped in the compatibility layer
@@ -60,7 +60,18 @@ const react = [
6060
},
6161
];
6262

63-
export const eslintConfigs = { core, react };
63+
/**
64+
* Exported ESLint configurations.
65+
* @property {object} base - The base ESLint configuration.
66+
* @property {object} core - The base ESLint configuration.
67+
* @property {object} react - The React ESLint configuration.
68+
*/
69+
export const eslintConfigs = {
70+
base,
71+
/** @deprecated Use 'base' instead. */
72+
core: base,
73+
react,
74+
};
6475

6576
/** @type {import('prettier').Config} */
6677
export const prettierConfig = {

0 commit comments

Comments
 (0)