Skip to content

Commit c6bae49

Browse files
committed
chore(scripts): mark cjs scripts explicitely
This includes: - all scripts under the docs repository (publish.js is loaded with require()) - all eslintrc config scripts (loaded with require()) - grunt/bump script (loaded with require()) - conventional changelog script (loaded with require()) - webpack.config
1 parent f55ee06 commit c6bae49

File tree

10 files changed

+9
-4
lines changed

10 files changed

+9
-4
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
settings: {
1515
'import/resolver': {
1616
webpack: {
17-
config: 'webpack.config.js',
17+
config: './webpack.config.cjs',
1818
},
1919
},
2020
},
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
extends: [
33
'eslint-config-airbnb-base',
44
'eslint-config-airbnb-base/rules/strict',
5-
'../.eslintrc.js',
5+
'../.eslintrc.cjs',
66
],
77
env: {
88
node: true,

docs/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"private": true,
3+
"description": "JSDoc loads publish.js files with require(), so we need to configure everything under this path as a CommonJS module.",
4+
"type": "commonjs"
5+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
extends: [
33
'eslint-config-airbnb-base',
44
'eslint-config-airbnb-base/rules/strict',
5-
'../.eslintrc.js',
5+
'../.eslintrc.cjs',
66
],
77
parserOptions: {
88
ecmaVersion: 13,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"prepublishOnly": "npm run build && npm run transpile",
2828
"prepare": "cross-env NO_UPDATE_NOTIFIER=true node ./config/prepare.mjs && node ./config/replace.config.mjs",
2929
"watch": "cross-env BABEL_DISABLE_CACHE=1 babel --watch src --out-dir lib",
30-
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.js -i changelog.md -s",
30+
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.cjs -i changelog.md -s",
3131
"bump": "if [ -z $npm_config_level ]; then grunt bump:minor; else grunt bump:$npm_config_level; fi && npm run changelog && npm install && git add -A && git commit --amend --no-edit",
3232
"publish-next": "npm version prerelease --preid next && npm publish --access public --tag=next --provenance",
3333
"publish-latest": "npm publish --access public --tag=latest --provenance"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)