diff --git a/.eslintrc.js b/.eslintrc.js index 7ad191c..279bb37 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -132,6 +132,13 @@ module.exports = { 'no-console': 'off', }, }, + { + files: ['*.d.ts'], + rules: { + // Allow .d.ts files to self import so they can refer to their types in `papi-shared-types` + 'import/no-self-import': 'off', + }, + }, ], parserOptions: { ecmaVersion: 2022, diff --git a/package.json b/package.json index 6eba349..ec30342 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "lint:scripts": "eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .", "lint:styles": "stylelint **/*.{css,scss}", "lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix", - "lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx}\" && npm run lint:scripts" + "lint-fix:scripts": "prettier --write \"**/*.{ts,tsx,js,jsx,cjs}\" && npm run lint:scripts" }, "browserslist": [], "peerDependencies": {