Skip to content

Commit

Permalink
Add env to eslint config (#722)
Browse files Browse the repository at this point in the history
Else it will complain about uses of console.log etc. Added node/browser/es2017 for the 90% use case. Fixes sveltejs/language-tools#918
  • Loading branch information
dummdidumm authored Mar 27, 2021
1 parent f7badf1 commit df380e6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-waves-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Add env options to eslint config
5 changes: 5 additions & 0 deletions packages/create-svelte/template-additions/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ module.exports = {
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018
},
env: {
browser: true,
es2017: true,
node: true
}
};
5 changes: 5 additions & 0 deletions packages/create-svelte/template-additions/.eslintrc.ts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ module.exports = {
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018
},
env: {
browser: true,
es2017: true,
node: true
}
};

0 comments on commit df380e6

Please sign in to comment.