From 9fdb989390405fcc4d6518d46e23538ea87afae2 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 1 Oct 2025 23:45:00 +0900 Subject: [PATCH 1/3] Update ignore --- .changeset/full-flowers-sing.md | 5 +++++ .lintstagedrc.mjs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/full-flowers-sing.md diff --git a/.changeset/full-flowers-sing.md b/.changeset/full-flowers-sing.md new file mode 100644 index 0000000..e2b971a --- /dev/null +++ b/.changeset/full-flowers-sing.md @@ -0,0 +1,5 @@ +--- +'eslint-plugin-devup': patch +--- + +Update ignore diff --git a/.lintstagedrc.mjs b/.lintstagedrc.mjs index 7afc780..c03b6c3 100644 --- a/.lintstagedrc.mjs +++ b/.lintstagedrc.mjs @@ -1,7 +1,7 @@ export default { '**/*.{js,jsx,ts,tsx,mjs,md,mdx,json,json5,jsonc}': (files) => { return [ - `npx eslint --config eslint.config.mjs --fix ${files.join(' ')}`, + `pnpm eslint --config eslint.config.mjs --fix ${files.join(' ')}`, `git add ${files.join(' ')}`, ] }, From 342bb92e92c2fb699312cfed2d3ba2e109b9bf54 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 1 Oct 2025 23:46:12 +0900 Subject: [PATCH 2/3] Update ignore --- src/configs/recommended.ts | 227 ++++++++++++++++++------------------- 1 file changed, 113 insertions(+), 114 deletions(-) diff --git a/src/configs/recommended.ts b/src/configs/recommended.ts index f6e2572..0775d38 100644 --- a/src/configs/recommended.ts +++ b/src/configs/recommended.ts @@ -18,10 +18,6 @@ export default [ ignores: [ '**/node_modules/', '**/build/', - '**/__snapshots__/', - '!**/src/**', - '!vite.config.ts', - '!**/.storybook/**', '**/storybook-static/', '**/dist/', '**/next-env.d.ts', @@ -34,124 +30,127 @@ export default [ '**/target/', '**/venv/', '**/.venv/', + '.husky/', + '!**/src/**', + '!vite.config.ts', + '!**/.storybook/**', + '**/__snapshots__/', ], }, ...devupUiEslintPlugin.configs.recommended, react.configs.flat!.recommended, - ...tseslint.config( - js.configs.recommended, - eslintPluginPrettierRecommended, - ...tseslint.configs.recommended, - ...pluginQuery.configs['flat/recommended'], - { - settings: { - react: { - version: 'detect', - defaultVersion: '19', - }, + js.configs.recommended, + eslintPluginPrettierRecommended, + ...tseslint.configs.recommended, + ...pluginQuery.configs['flat/recommended'], + { + settings: { + react: { + version: 'detect', + defaultVersion: '19', }, - plugins: { - 'react-hooks': hooksPlugin, - 'unused-imports': unusedImports, - 'simple-import-sort': simpleImportSort, - '@devup': { - rules: { - component, - 'app-page': appPage, - 'component-interface': componentInterface, - }, + }, + plugins: { + 'react-hooks': hooksPlugin, + 'unused-imports': unusedImports, + 'simple-import-sort': simpleImportSort, + '@devup': { + rules: { + component, + 'app-page': appPage, + 'component-interface': componentInterface, }, }, - rules: { - 'react/react-in-jsx-scope': 'off', - 'require-jsdoc': 'off', - 'valid-jsdoc': 'off', - 'prettier/prettier': [ - 'error', - { - endOfLine: 'auto', - trailingComma: 'all', - singleQuote: true, - semi: false, - }, - ], - 'no-trailing-spaces': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - 'no-constant-condition': ['error', { checkLoops: false }], - 'react/jsx-curly-brace-presence': 'error', - camelcase: 'off', - 'simple-import-sort/imports': 'error', - 'simple-import-sort/exports': 'error', - 'react/jsx-sort-props': [ - 'error', - { - callbacksLast: false, - shorthandFirst: false, - shorthandLast: false, - ignoreCase: false, - noSortAlphabetically: false, - reservedFirst: true, - }, - ], - '@typescript-eslint/no-unused-vars': [ - 'error', - { - args: 'all', - argsIgnorePattern: '^_', - caughtErrors: 'all', - caughtErrorsIgnorePattern: '^_', - destructuredArrayIgnorePattern: '^_', - varsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], - 'react/sort-default-props': 'error', - 'unused-imports/no-unused-imports': 'error', - 'unused-imports/no-unused-vars': 'off', - 'comma-dangle': 'off', - 'react/prop-types': 'off', - 'no-console': [ - 'error', - { - allow: ['info', 'debug', 'warn', 'error'], - }, - ], - 'spaced-comment': [ - 'error', - 'always', - { - markers: ['/'], - }, - ], - '@devup/component-interface': 'error', - '@devup/app-page': 'error', - '@devup/component': 'error', - ...hooksPlugin.configs.recommended.rules, - 'react-hooks/exhaustive-deps': [ - 'warn', - { - additionalHooks: 'useSafeEffect', - }, - ], - '@typescript-eslint/no-unused-expressions': [ - 'error', - { - allowShortCircuit: true, - allowTernary: true, - }, - ], - }, }, - { - files: ['**/*.test-d.{ts,tsx}'], - rules: { - '@typescript-eslint/no-unused-expressions': 'off', - }, + rules: { + 'react/react-in-jsx-scope': 'off', + 'require-jsdoc': 'off', + 'valid-jsdoc': 'off', + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', + trailingComma: 'all', + singleQuote: true, + semi: false, + }, + ], + 'no-trailing-spaces': 'error', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + 'no-constant-condition': ['error', { checkLoops: false }], + 'react/jsx-curly-brace-presence': 'error', + camelcase: 'off', + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'react/jsx-sort-props': [ + 'error', + { + callbacksLast: false, + shorthandFirst: false, + shorthandLast: false, + ignoreCase: false, + noSortAlphabetically: false, + reservedFirst: true, + }, + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + 'react/sort-default-props': 'error', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': 'off', + 'comma-dangle': 'off', + 'react/prop-types': 'off', + 'no-console': [ + 'error', + { + allow: ['info', 'debug', 'warn', 'error'], + }, + ], + 'spaced-comment': [ + 'error', + 'always', + { + markers: ['/'], + }, + ], + '@devup/component-interface': 'error', + '@devup/app-page': 'error', + '@devup/component': 'error', + ...hooksPlugin.configs.recommended.rules, + 'react-hooks/exhaustive-deps': [ + 'warn', + { + additionalHooks: 'useSafeEffect', + }, + ], + '@typescript-eslint/no-unused-expressions': [ + 'error', + { + allowShortCircuit: true, + allowTernary: true, + }, + ], + }, + }, + { + files: ['**/*.test-d.{ts,tsx}'], + rules: { + '@typescript-eslint/no-unused-expressions': 'off', }, - ), + }, // md, mdx rules { ...mdx.flat, @@ -171,4 +170,4 @@ export default [ '@typescript-eslint/no-empty-object-type': 'off', }, }, -] as any +] From ece7af8689f149d069e0e0e1ce30cdfe1b53f341 Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Wed, 1 Oct 2025 23:46:26 +0900 Subject: [PATCH 3/3] Update ignore --- .../__tests__/__snapshots__/recommended.test.ts.snap | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/configs/__tests__/__snapshots__/recommended.test.ts.snap b/src/configs/__tests__/__snapshots__/recommended.test.ts.snap index ea89230..0230f3c 100644 --- a/src/configs/__tests__/__snapshots__/recommended.test.ts.snap +++ b/src/configs/__tests__/__snapshots__/recommended.test.ts.snap @@ -6,10 +6,6 @@ exports[`recommended > export recommended config 1`] = ` "ignores": [ "**/node_modules/", "**/build/", - "**/__snapshots__/", - "!**/src/**", - "!vite.config.ts", - "!**/.storybook/**", "**/storybook-static/", "**/dist/", "**/next-env.d.ts", @@ -22,6 +18,11 @@ exports[`recommended > export recommended config 1`] = ` "**/target/", "**/venv/", "**/.venv/", + ".husky/", + "!**/src/**", + "!vite.config.ts", + "!**/.storybook/**", + "**/__snapshots__/", ], }, {