Skip to content

Commit

Permalink
chore(scripts): mark cjs scripts explicitely
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Desplandis committed Mar 21, 2024
1 parent f55ee06 commit 0578433
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
settings: {
'import/resolver': {
webpack: {
config: 'webpack.config.js',
config: './webpack.config.cjs',
},
},
},
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/.eslintrc.js → docs/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
extends: [
'eslint-config-airbnb-base',
'eslint-config-airbnb-base/rules/strict',
'../.eslintrc.js',
'../.eslintrc.cjs',
],
env: {
node: true,
Expand Down
5 changes: 5 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"private": true,
"description": "JSDoc loads publish.js files with require(), so we need to configure everything under this path as a CommonJS module.",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion examples/.eslintrc.js → examples/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
extends: [
'eslint-config-airbnb-base',
'eslint-config-airbnb-base/rules/strict',
'../.eslintrc.js',
'../.eslintrc.cjs',
],
parserOptions: {
ecmaVersion: 13,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prepublishOnly": "npm run build && npm run transpile",
"prepare": "cross-env NO_UPDATE_NOTIFIER=true node ./config/prepare.mjs && node ./config/replace.config.mjs",
"watch": "cross-env BABEL_DISABLE_CACHE=1 babel --watch src --out-dir lib",
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.js -i changelog.md -s",
"changelog": "conventional-changelog -n ./config/conventionalChangelog/config.cjs -i changelog.md -s",
"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",
"publish-next": "npm version prerelease --preid next && npm publish --access public --tag=next --provenance",
"publish-latest": "npm publish --access public --tag=latest --provenance"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0578433

Please sign in to comment.