Skip to content

Commit

Permalink
feat: refactored lint-staged package
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Feb 10, 2023
1 parent dc68784 commit 4297b9f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 108 deletions.
3 changes: 0 additions & 3 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ const rules = {
'**/*.{json,md,mdx,css,html,yml,yaml,scss,ts,js,tsx,jsx,mjs}': filenames => {
return [`prettier --write ${concatFilesForPrettier(filenames)}`]
},
'**/*': filenames => {
return [`secretlint ${concatFilesForPrettier(filenames)}`]
},
}

module.exports = rules
33 changes: 0 additions & 33 deletions packages/browserslist-config/lint-staged.config.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/commitlint-config/lint-staged.config.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/eslint-config-bases/lint-staged.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion packages/eslint-config-bases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.5"
"typescript": "^4.9.5",
"@wayofdev/lint-staged-config": "workspace:*"
},
"peerDependenciesMeta": {
"@graphql-eslint/eslint-plugin": {
Expand Down
5 changes: 0 additions & 5 deletions packages/lint-staged-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
"email": "[email protected]",
"url": "https://github.com/lotyp"
},
"exports": {
".": {
"require": "./src/common.js"
}
},
"main": "src/common.js",
"files": [
"src/*",
Expand Down
7 changes: 7 additions & 0 deletions packages/lint-staged-config/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module '@wayofdev/lint-staged-config' {
export function concatFilesForPrettier(filenames: string[]): string

export function concatFilesForStylelint(filenames: string[]): string

export function getEslintFixCmd({}): string
}
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4297b9f

Please sign in to comment.