Skip to content

Commit

Permalink
Fixed lint-staged config
Browse files Browse the repository at this point in the history
  • Loading branch information
imjordanxd committed Dec 14, 2024
1 parent d4172b7 commit 5da6161
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module.exports = {
extends: ['prettier', 'plugin:react/recommended', 'plugin:react/jsx-runtime'],
extends: [
'prettier',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
],
plugins: ['react', 'prettier'],
env: {
browser: true,
Expand All @@ -15,7 +19,7 @@ module.exports = {
},
},
rules: {
'prettier/prettier': 'error',
'prettier/prettier': ['error'],
'no-unused-vars': [
'off',
{
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
"build": "mkdirp dist && tsc",
"prepublish": "npm run build",
"test": "jest test",
"lint": "eslint",
"precommit": "lint-staged"
"lint": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\" --fix --max-warnings 0",
"precommit": "lint-staged",
"prepare": "husky"
},
"lint-staged": {
"src/*.{js,jsx}": [
"eslint --fix --max-warnings 0"
],
"test/*.{js,jsx}": [
"{src,test}/*.{js,jsx,ts,tsx}": [
"eslint --fix --max-warnings 0"
]
},
Expand Down

0 comments on commit 5da6161

Please sign in to comment.