@kazupon/eslint-config 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -7
- package/dist/index.js +1 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -360,7 +360,7 @@ async function vue(options = {}) {
|
|
|
360
360
|
//#endregion
|
|
361
361
|
//#region src/configs/react.ts
|
|
362
362
|
async function react(options = {}) {
|
|
363
|
-
const { rules: overrideRules = {},
|
|
363
|
+
const { rules: overrideRules = {}, settings = {} } = options;
|
|
364
364
|
const useTypeScript = !options.typescript;
|
|
365
365
|
const enableRefresh = !!options.refresh;
|
|
366
366
|
const [react$1, reactHooks, reactRefresh] = await Promise.all([loadPlugin("eslint-plugin-react"), loadPlugin("eslint-plugin-react-hooks"), enableRefresh ? loadPlugin("eslint-plugin-react-refresh") : null]);
|
|
@@ -372,12 +372,6 @@ async function react(options = {}) {
|
|
|
372
372
|
files: getFiles(),
|
|
373
373
|
rules: { ...overrideRules }
|
|
374
374
|
};
|
|
375
|
-
if (useTypeScript) {
|
|
376
|
-
customConfig.languageOptions = {
|
|
377
|
-
parser: await getTypeScriptParser(),
|
|
378
|
-
parserOptions: { ...parserOptions }
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
375
|
const configs = [{
|
|
382
376
|
name: "react/flat/recommended",
|
|
383
377
|
files: getFiles(),
|
package/dist/index.js
CHANGED
|
@@ -336,7 +336,7 @@ async function vue(options = {}) {
|
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/configs/react.ts
|
|
338
338
|
async function react(options = {}) {
|
|
339
|
-
const { rules: overrideRules = {},
|
|
339
|
+
const { rules: overrideRules = {}, settings = {} } = options;
|
|
340
340
|
const useTypeScript = !options.typescript;
|
|
341
341
|
const enableRefresh = !!options.refresh;
|
|
342
342
|
const [react$1, reactHooks, reactRefresh] = await Promise.all([loadPlugin("eslint-plugin-react"), loadPlugin("eslint-plugin-react-hooks"), enableRefresh ? loadPlugin("eslint-plugin-react-refresh") : null]);
|
|
@@ -348,12 +348,6 @@ async function react(options = {}) {
|
|
|
348
348
|
files: getFiles(),
|
|
349
349
|
rules: { ...overrideRules }
|
|
350
350
|
};
|
|
351
|
-
if (useTypeScript) {
|
|
352
|
-
customConfig.languageOptions = {
|
|
353
|
-
parser: await getTypeScriptParser(),
|
|
354
|
-
parserOptions: { ...parserOptions }
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
351
|
const configs = [{
|
|
358
352
|
name: "react/flat/recommended",
|
|
359
353
|
files: getFiles(),
|