Skip to content

Commit 28e6d69

Browse files
committed
Fix no-unpublished-import rule
1 parent 800baec commit 28e6d69

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.eslintrc.cjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,26 @@ module.exports = {
113113
}
114114
],
115115

116+
'n/no-unpublished-import': [
117+
'error',
118+
{
119+
convertPath: [
120+
{
121+
include: ['src/**'],
122+
exclude: [
123+
'**/*.test.{js,ts}',
124+
'test/**/*',
125+
'jest.environment.js',
126+
'globals.d.ts',
127+
'postcss.config.js',
128+
'webpack.config.js'
129+
],
130+
replace: ['^src/(.+)$', '.server/$1']
131+
}
132+
]
133+
}
134+
],
135+
116136
// Check for valid formatting
117137
'jsdoc/check-line-alignment': [
118138
'warn',

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"description": "Defra forms engine",
55
"type": "module",
66
"main": ".server/server/plugins/engine/index.js",
7+
"files": [
8+
".server",
9+
".public"
10+
],
711
"scripts": {
812
"build": "npm run build:server && npm run build:client",
913
"build:client": "NODE_ENV=${NODE_ENV:-production} webpack",
@@ -78,6 +82,7 @@
7882
"lodash": "^4.17.21",
7983
"marked": "^15.0.6",
8084
"nunjucks": "^3.2.3",
85+
"outdent": "^0.8.0",
8186
"pino": "^9.6.0",
8287
"pino-pretty": "^13.0.0",
8388
"proxy-agent": "^6.5.0",
@@ -142,7 +147,6 @@
142147
"jest-extended": "^4.0.2",
143148
"jsdom": "^25.0.1",
144149
"lint-staged": "^15.3.0",
145-
"outdent": "^0.8.0",
146150
"postcss": "^8.4.49",
147151
"postcss-load-config": "^6.0.1",
148152
"postcss-loader": "^8.1.1",

0 commit comments

Comments
 (0)