Skip to content

Commit

Permalink
chore: Fix lint-staged error
Browse files Browse the repository at this point in the history
  • Loading branch information
Flix committed Sep 2, 2024
1 parent 7e5c599 commit 6da77ba
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module.exports = {
root: true,
extends: ['@react-native', 'prettier'],
plugins: ['unused-imports'],
plugins: ['unused-imports', 'prettier'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-native/no-inline-styles': 'off',
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'prettier/prettier': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged
yarn lint
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js, jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"*.{json,html}": ["prettier --write --ignore-unknown"]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"packages/*"
],
"scripts": {
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"lint": "lint-staged",
"release": "yarn build && npm run release --workspaces && release-it",
"snackbar-example": "expo start packages/snackbar/example -w",
"build": "yarn workspaces foreach run build",
Expand All @@ -28,7 +28,7 @@
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "2.0.0",
"eslint-plugin-unused-imports": "^3.2.0",
"expo": "~49.0.15",
"expo-status-bar": "~1.6.0",
"husky": "^9.1.5",
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7639,18 +7639,18 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-unused-imports@npm:2.0.0":
version: 2.0.0
resolution: "eslint-plugin-unused-imports@npm:2.0.0"
"eslint-plugin-unused-imports@npm:^3.2.0":
version: 3.2.0
resolution: "eslint-plugin-unused-imports@npm:3.2.0"
dependencies:
eslint-rule-composer: ^0.3.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ^5.0.0
eslint: ^8.0.0
"@typescript-eslint/eslint-plugin": 6 - 7
eslint: 8
peerDependenciesMeta:
"@typescript-eslint/eslint-plugin":
optional: true
checksum: 8aa1e03e75da2a62a354065e0cb8fe370118c6f8d9720a32fe8c1da937de6adb81a4fed7d0d391d115ac9453b49029fb19f970d180a2cf3dba451fd4c20f0dc4
checksum: e85ae4f3af489294ef5e0969ab904fa87f9fa7c959ca0804f30845438db4aeb0428ddad7ab06a70608e93121626799977241b442fdf126a4d0667be57390c3d6
languageName: node
linkType: hard

Expand Down Expand Up @@ -8460,7 +8460,7 @@ __metadata:
eslint: ^8.51.0
eslint-config-prettier: ^9.0.0
eslint-plugin-prettier: ^5.0.1
eslint-plugin-unused-imports: 2.0.0
eslint-plugin-unused-imports: ^3.2.0
expo: ~49.0.15
expo-status-bar: ~1.6.0
husky: ^9.1.5
Expand Down

0 comments on commit 6da77ba

Please sign in to comment.