Skip to content

Commit

Permalink
fix: add type declarations for eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanmanning committed Feb 21, 2024
1 parent 8909075 commit dc7bedc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.husky/_
packages/crash-handler/**/*.d.*
packages/errors/**/*.d.*
packages/eslint-config/**/*.d.*
packages/fetch-error-handler/**/*.d.*
packages/log-error/**/*.d.*
packages/logger/**/*.d.*
Expand Down
1 change: 0 additions & 1 deletion jsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"include": [
"packages/crash-handler/**/*.js",
"packages/errors/**/*.js",
"packages/eslint-config/**/*.js",
"packages/fetch-error-handler/**/*.js",
"packages/log-error/**/*.js",
"packages/logger/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @type {import('eslint').ESLint.ConfigData}
* @type {import('@dotcom-reliability-kit/eslint-config')}
*/
const config = {
env: {
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"node": "18.x || 20.x",
"npm": "8.x || 9.x || 10.x"
},
"main": "lib",
"main": "lib/index.js",
"types": "types/index.d.ts",
"peerDependencies": {
"eslint": ">=8.27.0"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-config/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '@dotcom-reliability-kit/eslint-config' {
type config = import('eslint').ESLint.ConfigData;
export = config;
}
1 change: 0 additions & 1 deletion scripts/clean-generated-types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

find ./packages/crash-handler -name "*.d.ts*" | xargs -r rm
find ./packages/errors -name "*.d.ts*" | xargs -r rm
find ./packages/eslint-config -name "*.d.ts*" | xargs -r rm
find ./packages/fetch-error-handler -name "*.d.ts*" | xargs -r rm
find ./packages/log-error -name "*.d.ts*" | xargs -r rm
find ./packages/logger -name "*.d.ts*" | xargs -r rm
Expand Down

0 comments on commit dc7bedc

Please sign in to comment.