Skip to content

Commit 5bc2b91

Browse files
committed
testest with eslint 7, update config
1 parent 689caa2 commit 5bc2b91

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

js/red-javascript-style-guide/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-red",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"license": "CC0-1.0",
55
"homepage": "https://github.com/GrosSacASac/JavaScript-Set-Up/tree/master/js/red-javascript-style-guide",
66
"files": [

js/red-javascript-style-guide/readme.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ Avoid peerDependencies because they create more problems than they solve, instea
678678

679679
### Lint set-up
680680

681-
Install eslint 6+ and eslint-red rules
681+
Install eslint and eslint-red rules
682682

683683
```
684684
npm i -D eslint eslint-config-red
@@ -690,18 +690,22 @@ Inside package.json
690690
"eslintConfig": {
691691
"extends": ["red"],
692692
"parserOptions": {
693-
"ecmaVersion": 2020,
693+
"ecmaVersion": 2021,
694694
"sourceType": "module",
695695
"ecmaFeatures": {}
696696
},
697697
"env": {
698-
"es2020": true,
699-
"browser": true
698+
"es2021": true,
699+
"browser": true,
700+
"node": true,
701+
"serviceworker": true,
700702
},
701703
"rules": {}
702704
}
703705
```
704706

707+
Below es2021, remove unused evnironment.
708+
705709
If code is meant for other environments other than browser, [add them to "env"](https://eslint.org/docs/user-guide/configuring#specifying-environments)
706710

707711
Inside package.json > scripts

0 commit comments

Comments
 (0)