Skip to content

Commit 623a4ba

Browse files
committed
Introduce lint error
1 parent 38adfb1 commit 623a4ba

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.husky/pre-commit

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx lint-staged --verbose

.lintstagedrc.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
2-
'packages/nextjs/**/*.{ts,tsx}': ['prettier --write', 'npx eslint package/nextjs'],
2+
'packages/nextjs/**/*.{ts,tsx}': [
3+
'prettier --write',
4+
'npx eslint --debug --config ./packages/nextjs/.eslintrc.json',
5+
],
36
'packages/nextjs/**/*.{scss,css}': ['prettier --write'],
47
};

packages/nextjs/.eslintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@
4545
"@next/next/no-html-link-for-pages": "off"
4646
},
4747
"settings": {
48+
"import/resolver": {
49+
"typescript": {
50+
"project": "./tsconfig.json"
51+
}
52+
},
4853
"css-modules": {
49-
"basePath": "src"
54+
"basePath": "packages/nextjs/src"
5055
}
5156
}
5257
}

packages/nextjs/src/components/_common/accordion/Accordion.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const Accordion = ({ accordion }: AccordionProps) => {
5555
/* eslint-disable-next-line react-hooks/exhaustive-deps */
5656
}, []);
5757

58-
const foo = 'bar!!!';
58+
const foo = 'bar';
5959

6060
// Show all panels in edit mode, but only valid panels in view mode
6161
const validAccordion = accordion.filter(validatePanel);

0 commit comments

Comments
 (0)