Skip to content

Commit

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

module.exports = rules
8 changes: 6 additions & 2 deletions packages/htmlhint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@
"email": "[email protected]",
"url": "https://github.com/lotyp"
},
"main": "index.json",
"files": [
"index.json"
],
"scripts": {
"clean": "rimraf ./dist ./coverage ./tsconfig.tsbuildinfo",
"lint": "eslint --ext .ts,.js,.cjs,.mjs --cache --cache-location ../../.cache/eslint/htmlhint-config.eslintcache",
"lint:fix": "eslint --ext .ts,.tsx,.js,.jsx,.mjs,.cjs,.mts,.cts --fix --cache --cache-location ../../.cache/eslint/htmlhint-config.eslintcache"
"lint": "eslint --ext .json --cache --cache-location ../../.cache/eslint/htmlhint-config.eslintcache",
"lint:fix": "eslint --ext .json --fix --cache --cache-location ../../.cache/eslint/htmlhint-config.eslintcache"
},
"devDependencies": {
"rimraf": "^4.1.2"
Expand Down
13 changes: 11 additions & 2 deletions packages/secretlint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,27 @@
"directory": "packages/secretlint-config"
},
"license": "MIT",
"author": "[email protected]",
"author": {
"name": "Andrij Orlenko",
"email": "[email protected]",
"url": "https://github.com/lotyp"
},
"main": "index.json",
"files": [
"index.json",
"scripts/*"
],
"scripts": {
"test": "echo \"No test specified\""
"clean": "rimraf ./dist ./coverage ./tsconfig.tsbuildinfo",
"lint": "eslint --ext .js,.json --cache --cache-location ../../.cache/eslint/secretlint-config.eslintcache",
"lint:fix": "eslint --ext .js,.json --fix --cache --cache-location ../../.cache/eslint/secretlint-config.eslintcache"
},
"dependencies": {
"@secretlint/secretlint-rule-preset-recommend": "^6.2.0"
},
"devDependencies": {
"rimraf": "^4.1.2"
},
"peerDependencies": {
"secretlint": ">= 6"
},
Expand Down

0 comments on commit 7a7d628

Please sign in to comment.