Skip to content

Commit ea3b2a3

Browse files
committed
[meta] use npmignore --auto instead of files to limit published files
1 parent 7456e18 commit ea3b2a3

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@ sftp-config.json
2323
eslint-remote-tester-results
2424

2525
# Only apps should have lockfiles
26-
yarn.lock
26+
npm-shrinkwrap≥json
2727
package-lock.json
28+
yarn.lock
29+
30+
.npmignore

package.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "React specific linting rules for ESLint",
66
"main": "index.js",
77
"scripts": {
8+
"prepack": "npmignore --auto --commentLines=autogenerated",
89
"lint": "eslint .",
910
"postlint": "npm run type-check",
1011
"pretest": "npm run lint",
@@ -15,12 +16,6 @@
1516
"generate-list-of-rules": "md-magic --path README.md",
1617
"generate-list-of-rules:check": "npm run generate-list-of-rules && git diff --exit-code README.md"
1718
},
18-
"files": [
19-
"LICENSE",
20-
"README.md",
21-
"index.js",
22-
"lib"
23-
],
2419
"repository": {
2520
"type": "git",
2621
"url": "https://github.com/jsx-eslint/eslint-plugin-react"
@@ -68,6 +63,7 @@
6863
"ls-engines": "^0.6.6",
6964
"markdown-magic": "^2.6.0",
7065
"mocha": "^5.2.0",
66+
"npmignore": "^0.3.0",
7167
"sinon": "^7.5.0",
7268
"typescript": "^3.9.9",
7369
"typescript-eslint-parser": "^20.1.1"
@@ -85,9 +81,18 @@
8581
"react"
8682
],
8783
"license": "MIT",
88-
"greenkeeper": {
84+
"publishConfig": {
8985
"ignore": [
90-
"semver"
86+
".github/",
87+
"!lib",
88+
"docs/",
89+
"test/",
90+
"tests/",
91+
"*.md",
92+
"*.config.js",
93+
".eslintrc",
94+
".editorconfig",
95+
"tsconfig.json"
9196
]
9297
}
9398
}

0 commit comments

Comments
 (0)