Skip to content

Commit

Permalink
feat: cjs/mjs extensions
Browse files Browse the repository at this point in the history
dependency updates
  • Loading branch information
TobiTenno committed Feb 18, 2024
1 parent f097e6d commit 6e637c0
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 32 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: '.nvmrc'
- name: Install Dependencies
run: npx npm-install-peers
- name: Run linters
Expand All @@ -29,7 +29,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
semantic_version: 19
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/hydrogen
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ you must still include babel config in your eslint config
"parserOptions": {
"babelOptions": {
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-private-methods"
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-private-methods"
]
}
}
Expand All @@ -38,8 +38,8 @@ as well as the accompanying babel config
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-private-methods"
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-private-methods"
]
}
```
Expand Down
11 changes: 10 additions & 1 deletion configs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ module.exports = {
'newlines-between': 'always',
},
],
'import/extensions': [
'error',
'never',
{
json: 'always',
cjs: 'always',
mjs: 'always',
},
],
'no-null/no-null': 2,
quotes: [
2,
Expand All @@ -89,7 +98,7 @@ module.exports = {
sourceType: 'script',
ecmaVersion: 6,
babelOptions: {
plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-private-methods'],
plugins: ['@babel/plugin-transform-class-properties', '@babel/plugin-transform-private-methods'],
},
},
};
4 changes: 2 additions & 2 deletions configs/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = {
},
babelOptions: {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-transform-class-properties',
'@babel/plugin-transform-private-methods',
'@babel/plugin-syntax-import-assertions',
],
},
Expand Down
4 changes: 2 additions & 2 deletions configs/strict-esm-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = {
},
babelOptions: {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-transform-class-properties',
'@babel/plugin-transform-private-methods',
'@babel/plugin-syntax-import-assertions',
],
},
Expand Down
4 changes: 2 additions & 2 deletions configs/strict-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module.exports = {
ecmaVersion: 6,
babelOptions: {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-transform-class-properties',
'@babel/plugin-transform-private-methods',
'@babel/plugin-syntax-import-assertions',
],
},
Expand Down
2 changes: 1 addition & 1 deletion configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
modules: true,
},
babelOptions: {
plugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-private-methods'],
plugins: ['@babel/plugin-transform-class-properties', '@babel/plugin-transform-private-methods'],
},
},
};
40 changes: 23 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,29 @@
"./strict-esm-jsdoc": "./configs/strict-esm-jsdoc.js"
},
"peerDependencies": {
"@babel/core": "^7.19.1",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-syntax-import-assertions": "^7.20.0",
"@babel/preset-env": "^7.19.1",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"eslint": "^8.24.0",
"@babel/core": "^7.23.9",
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-transform-class-properties": "^7.23.3",
"@babel/plugin-transform-private-methods": "^7.23.3",
"@babel/plugin-syntax-import-assertions": "^7.23.3",
"@babel/preset-env": "^7.23.9",
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^48.0.6",
"eslint-config-prettier": "^9.1.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.1.0",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1"
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5"
},
"overrides": {
"eslint-config-airbnb-typescript": {
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1"
}
},
"engines": {
"npm": ">=7"
Expand All @@ -58,8 +64,8 @@
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-private-methods"
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-private-methods"
]
},
"release": {
Expand Down

0 comments on commit 6e637c0

Please sign in to comment.