Skip to content

Commit 82cebe8

Browse files
authored
Merge pull request #28 from qubyte/ES2022
Updates to include ES2022 variants.
2 parents b2bc989 + 07ee750 commit 82cebe8

File tree

6 files changed

+1032
-472
lines changed

6 files changed

+1032
-472
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
steps:
1313
- name: checkout
1414
uses: actions/checkout@main
15-
- name: use node 14
16-
uses: actions/setup-node@v2
15+
- name: use node 18
16+
uses: actions/setup-node@v3
1717
with:
18-
version: 14.x
18+
node-version: 18.x
1919
- run: npm ci
2020
- run: npm test

ES2022-module.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: require('path').join(__dirname, 'ES2022.js'),
5+
parserOptions: {
6+
ecmaVersion: 2022,
7+
sourceType: 'module'
8+
}
9+
};

ES2022.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: require('path').join(__dirname, 'ES2021.js'),
5+
env: {
6+
es2022: true
7+
}
8+
};

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ rules as you like.
3333
## ES2015 Node.js project.
3434

3535
As before the environment needs to be specified. Since Node 6+ has good ES2015
36-
feature coverage, it makes sense to use ES2015 features. A sharable config is
36+
feature coverage, it makes sense to use ES2015 features. A shareable config is
3737
provided for ES2015 code:
3838

3939
```json
@@ -47,7 +47,7 @@ provided for ES2015 code:
4747

4848
Internally this config extends the base qubyte config.
4949

50-
## ES2017, ES2018, ES2019, ES2020, ES2021
50+
## ES2017, ES2018, ES2019, ES2020, ES2021, ES2022
5151

5252
These are mostly the same as ES2015, but with updated parser configuration and
5353
globals so that ESLint doesn't fall over around things like object spreading.
@@ -57,7 +57,7 @@ globals so that ESLint doesn't fall over around things like object spreading.
5757
The variants with `-module` in their names are set up for ES module based
5858
projects. These are provided because setting `parserOptions` in an extending
5959
ESLint config wipes out the `parserOptions` it provides rather than merging
60-
them, and this is easy to forget to handle. to use, for example for ES2021:
60+
them, and this is easy to forget to handle. To use, for example for ES2021:
6161

6262
```json
6363
{

0 commit comments

Comments
 (0)