Skip to content

Commit cb5c96a

Browse files
authored
Merge pull request #22 from dev-five-git/update-ignore
Update ignore
2 parents 7595c00 + ece7af8 commit cb5c96a

File tree

4 files changed

+124
-119
lines changed

4 files changed

+124
-119
lines changed

.changeset/full-flowers-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-devup': patch
3+
---
4+
5+
Update ignore

.lintstagedrc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
'**/*.{js,jsx,ts,tsx,mjs,md,mdx,json,json5,jsonc}': (files) => {
33
return [
4-
`npx eslint --config eslint.config.mjs --fix ${files.join(' ')}`,
4+
`pnpm eslint --config eslint.config.mjs --fix ${files.join(' ')}`,
55
`git add ${files.join(' ')}`,
66
]
77
},

src/configs/__tests__/__snapshots__/recommended.test.ts.snap

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ exports[`recommended > export recommended config 1`] = `
66
"ignores": [
77
"**/node_modules/",
88
"**/build/",
9-
"**/__snapshots__/",
10-
"!**/src/**",
11-
"!vite.config.ts",
12-
"!**/.storybook/**",
139
"**/storybook-static/",
1410
"**/dist/",
1511
"**/next-env.d.ts",
@@ -22,6 +18,11 @@ exports[`recommended > export recommended config 1`] = `
2218
"**/target/",
2319
"**/venv/",
2420
"**/.venv/",
21+
".husky/",
22+
"!**/src/**",
23+
"!vite.config.ts",
24+
"!**/.storybook/**",
25+
"**/__snapshots__/",
2526
],
2627
},
2728
{

src/configs/recommended.ts

Lines changed: 113 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ export default [
1818
ignores: [
1919
'**/node_modules/',
2020
'**/build/',
21-
'**/__snapshots__/',
22-
'!**/src/**',
23-
'!vite.config.ts',
24-
'!**/.storybook/**',
2521
'**/storybook-static/',
2622
'**/dist/',
2723
'**/next-env.d.ts',
@@ -34,124 +30,127 @@ export default [
3430
'**/target/',
3531
'**/venv/',
3632
'**/.venv/',
33+
'.husky/',
34+
'!**/src/**',
35+
'!vite.config.ts',
36+
'!**/.storybook/**',
37+
'**/__snapshots__/',
3738
],
3839
},
3940
...devupUiEslintPlugin.configs.recommended,
4041
react.configs.flat!.recommended,
41-
...tseslint.config(
42-
js.configs.recommended,
43-
eslintPluginPrettierRecommended,
44-
...tseslint.configs.recommended,
45-
...pluginQuery.configs['flat/recommended'],
46-
{
47-
settings: {
48-
react: {
49-
version: 'detect',
50-
defaultVersion: '19',
51-
},
42+
js.configs.recommended,
43+
eslintPluginPrettierRecommended,
44+
...tseslint.configs.recommended,
45+
...pluginQuery.configs['flat/recommended'],
46+
{
47+
settings: {
48+
react: {
49+
version: 'detect',
50+
defaultVersion: '19',
5251
},
53-
plugins: {
54-
'react-hooks': hooksPlugin,
55-
'unused-imports': unusedImports,
56-
'simple-import-sort': simpleImportSort,
57-
'@devup': {
58-
rules: {
59-
component,
60-
'app-page': appPage,
61-
'component-interface': componentInterface,
62-
},
52+
},
53+
plugins: {
54+
'react-hooks': hooksPlugin,
55+
'unused-imports': unusedImports,
56+
'simple-import-sort': simpleImportSort,
57+
'@devup': {
58+
rules: {
59+
component,
60+
'app-page': appPage,
61+
'component-interface': componentInterface,
6362
},
6463
},
65-
rules: {
66-
'react/react-in-jsx-scope': 'off',
67-
'require-jsdoc': 'off',
68-
'valid-jsdoc': 'off',
69-
'prettier/prettier': [
70-
'error',
71-
{
72-
endOfLine: 'auto',
73-
trailingComma: 'all',
74-
singleQuote: true,
75-
semi: false,
76-
},
77-
],
78-
'no-trailing-spaces': 'error',
79-
'@typescript-eslint/explicit-module-boundary-types': 'off',
80-
'@typescript-eslint/no-explicit-any': 'off',
81-
'@typescript-eslint/no-var-requires': 'off',
82-
'@typescript-eslint/ban-ts-comment': 'off',
83-
'no-constant-condition': ['error', { checkLoops: false }],
84-
'react/jsx-curly-brace-presence': 'error',
85-
camelcase: 'off',
86-
'simple-import-sort/imports': 'error',
87-
'simple-import-sort/exports': 'error',
88-
'react/jsx-sort-props': [
89-
'error',
90-
{
91-
callbacksLast: false,
92-
shorthandFirst: false,
93-
shorthandLast: false,
94-
ignoreCase: false,
95-
noSortAlphabetically: false,
96-
reservedFirst: true,
97-
},
98-
],
99-
'@typescript-eslint/no-unused-vars': [
100-
'error',
101-
{
102-
args: 'all',
103-
argsIgnorePattern: '^_',
104-
caughtErrors: 'all',
105-
caughtErrorsIgnorePattern: '^_',
106-
destructuredArrayIgnorePattern: '^_',
107-
varsIgnorePattern: '^_',
108-
ignoreRestSiblings: true,
109-
},
110-
],
111-
'react/sort-default-props': 'error',
112-
'unused-imports/no-unused-imports': 'error',
113-
'unused-imports/no-unused-vars': 'off',
114-
'comma-dangle': 'off',
115-
'react/prop-types': 'off',
116-
'no-console': [
117-
'error',
118-
{
119-
allow: ['info', 'debug', 'warn', 'error'],
120-
},
121-
],
122-
'spaced-comment': [
123-
'error',
124-
'always',
125-
{
126-
markers: ['/'],
127-
},
128-
],
129-
'@devup/component-interface': 'error',
130-
'@devup/app-page': 'error',
131-
'@devup/component': 'error',
132-
...hooksPlugin.configs.recommended.rules,
133-
'react-hooks/exhaustive-deps': [
134-
'warn',
135-
{
136-
additionalHooks: 'useSafeEffect',
137-
},
138-
],
139-
'@typescript-eslint/no-unused-expressions': [
140-
'error',
141-
{
142-
allowShortCircuit: true,
143-
allowTernary: true,
144-
},
145-
],
146-
},
14764
},
148-
{
149-
files: ['**/*.test-d.{ts,tsx}'],
150-
rules: {
151-
'@typescript-eslint/no-unused-expressions': 'off',
152-
},
65+
rules: {
66+
'react/react-in-jsx-scope': 'off',
67+
'require-jsdoc': 'off',
68+
'valid-jsdoc': 'off',
69+
'prettier/prettier': [
70+
'error',
71+
{
72+
endOfLine: 'auto',
73+
trailingComma: 'all',
74+
singleQuote: true,
75+
semi: false,
76+
},
77+
],
78+
'no-trailing-spaces': 'error',
79+
'@typescript-eslint/explicit-module-boundary-types': 'off',
80+
'@typescript-eslint/no-explicit-any': 'off',
81+
'@typescript-eslint/no-var-requires': 'off',
82+
'@typescript-eslint/ban-ts-comment': 'off',
83+
'no-constant-condition': ['error', { checkLoops: false }],
84+
'react/jsx-curly-brace-presence': 'error',
85+
camelcase: 'off',
86+
'simple-import-sort/imports': 'error',
87+
'simple-import-sort/exports': 'error',
88+
'react/jsx-sort-props': [
89+
'error',
90+
{
91+
callbacksLast: false,
92+
shorthandFirst: false,
93+
shorthandLast: false,
94+
ignoreCase: false,
95+
noSortAlphabetically: false,
96+
reservedFirst: true,
97+
},
98+
],
99+
'@typescript-eslint/no-unused-vars': [
100+
'error',
101+
{
102+
args: 'all',
103+
argsIgnorePattern: '^_',
104+
caughtErrors: 'all',
105+
caughtErrorsIgnorePattern: '^_',
106+
destructuredArrayIgnorePattern: '^_',
107+
varsIgnorePattern: '^_',
108+
ignoreRestSiblings: true,
109+
},
110+
],
111+
'react/sort-default-props': 'error',
112+
'unused-imports/no-unused-imports': 'error',
113+
'unused-imports/no-unused-vars': 'off',
114+
'comma-dangle': 'off',
115+
'react/prop-types': 'off',
116+
'no-console': [
117+
'error',
118+
{
119+
allow: ['info', 'debug', 'warn', 'error'],
120+
},
121+
],
122+
'spaced-comment': [
123+
'error',
124+
'always',
125+
{
126+
markers: ['/'],
127+
},
128+
],
129+
'@devup/component-interface': 'error',
130+
'@devup/app-page': 'error',
131+
'@devup/component': 'error',
132+
...hooksPlugin.configs.recommended.rules,
133+
'react-hooks/exhaustive-deps': [
134+
'warn',
135+
{
136+
additionalHooks: 'useSafeEffect',
137+
},
138+
],
139+
'@typescript-eslint/no-unused-expressions': [
140+
'error',
141+
{
142+
allowShortCircuit: true,
143+
allowTernary: true,
144+
},
145+
],
146+
},
147+
},
148+
{
149+
files: ['**/*.test-d.{ts,tsx}'],
150+
rules: {
151+
'@typescript-eslint/no-unused-expressions': 'off',
153152
},
154-
),
153+
},
155154
// md, mdx rules
156155
{
157156
...mdx.flat,
@@ -171,4 +170,4 @@ export default [
171170
'@typescript-eslint/no-empty-object-type': 'off',
172171
},
173172
},
174-
] as any
173+
]

0 commit comments

Comments
 (0)