I have a chai among my devDependencies:
"devDependencies": {
"@types/chai": "4.2.14",
"chai": "4.2.0",
}
Chai is requires for tests only, but I don't going to publish the test files. The rule node/no-unpublished-import tells me:
"chai" is not published
From the documentation:
This intends to prevent "Module Not Found" error after npm publish. If you want to import devDependencies, please write .npmignore or "files" field of package.json.
I did not understand what means "write .npmignore" advice. What I need to write there? Currently, I have below content:
.idea/
/.eslintignore
/.eslintrc.yaml
/.gitignore
/.mocharc.yaml
/.npmignore
/tsconfig.json
**.test.ts
The last one ignores all test files using chai.