Skip to content

Commit

Permalink
chore: move lint away from core (#2632)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

Since the user is not supposed to change `.faststore`, keeping the
githooks and linting on the core package is not useful.

- Move lint from core to the root package
- Move stylelint to the root package
- Move husky and lint-staged to the root package.
  • Loading branch information
matheusps authored Jan 29, 2025
1 parent 28973b4 commit 76cdb63
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 148 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn install
yarn lint-staged
13 changes: 12 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@
},
"files": {
"ignoreUnknown": true,
"ignore": [".next", "dist", ".turbo", "package.json"]
"ignore": [
".next",
"dist",
".turbo",
"package.json",
"public/",
"coverage",
".vscode/",
".cache/",
"__generated__",
"@generated"
]
},
"formatter": {
"enabled": true,
Expand Down
18 changes: 16 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"build": "turbo run build --log-order=grouped",
"dev": "turbo run dev --parallel --no-cache",
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"lint:fix": "biome check --write .",
"stylelint": "stylelint \"**/*.scss\"",
"stylelint:fix": "stylelint \"**/*.scss\" --fix",
"test": "turbo run test",
"size": "turbo run size",
"release": "lerna version --conventional-commits --yes && lerna publish from-git --yes",
Expand All @@ -20,8 +22,16 @@
],
"devDependencies": {
"@biomejs/biome": "1.9.4",
"husky": "9.1.7",
"lerna": "^8.0.0",
"lint-staged": "15.4.3",
"prettier": "^3.1.0",
"stylelint": "^14.6.0",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-config-standard-scss": "^3.0.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.0.1",
"turbo": "^2.3.4"
},
"version": "0.0.0",
Expand All @@ -30,5 +40,9 @@
"yarn": "1.19.1"
},
"dependencies": {},
"packageManager": "yarn@1.19.1"
"packageManager": "yarn@1.19.1",
"lint-staged": {
"*.{ts,js,tsx,jsx,json}": "yarn lint:fix",
"*.scss": "stylelint --fix"
}
}
1 change: 0 additions & 1 deletion packages/core/.husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions packages/core/.husky/pre-commit

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/.stylelintignore

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core/.vscode/settings.json

This file was deleted.

35 changes: 5 additions & 30 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"test:e2e": "cypress open",
"test": "jest",
"lhci": "lhci autorun",
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json}\"",
"lint": "next lint",
"stylelint": "stylelint \"**/*.scss\"",
"stylelint:fix": "stylelint \"**/*.scss\" --fix",
"postinstall": "node postinstall.js && (is-ci || (cd ../.. && husky install packages/core/.husky)) || echo Skipped postinstall step for @faststore/core",
"postinstall": "node postinstall.js && is-ci || echo Skipped postinstall step for @faststore/core",
"partytown": "partytown copylib ./public/~partytown"
},
"engines": {
"node": ">=18"
},
"volta": {
"node": "18.19.0",
"yarn": "1.19.1"
},
"sideEffects": false,
"dependencies": {
"@antfu/ni": "^0.21.12",
Expand Down Expand Up @@ -99,33 +99,8 @@
"cypress-axe": "^1.5.0",
"cypress-wait-until": "^2.0.1",
"dotenv": "^8.2.0",
"eslint": "^7.32.0",
"husky": "^5.2.0",
"is-ci": "^3.0.0",
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"stylelint": "^14.6.0",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-config-standard-scss": "^3.0.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.0.1",
"ts-jest": "29.1.1"
},
"lint-staged": {
"*.{ts,js,tsx,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.json": [
"prettier --write"
],
"*.scss": [
"stylelint --fix"
]
},
"volta": {
"node": "18.19.0",
"yarn": "1.19.1"
}
}
File renamed without changes.
Loading

0 comments on commit 76cdb63

Please sign in to comment.