Skip to content

Commit

Permalink
fix: make origami-component eslint be able to parse async functions a…
Browse files Browse the repository at this point in the history
…nd other modern syntax
  • Loading branch information
JakeChampion committed Nov 12, 2021
1 parent 54d376c commit 33a14af
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
54 changes: 54 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions presets/eslint-config-origami-component/config.js
Expand Up @@ -2,18 +2,17 @@

module.exports = {
parserOptions: {
ecmaVersion: 7,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
env: {
es6: true,
es2021: true,
browser: true,
node: true,
},
plugins: ["import"],
plugins: ["import", "@lwc/eslint-plugin-lwc"],
rules: {
"import/extensions": ["warn", "ignorePackages"],
"no-unused-vars": "error",
Expand Down Expand Up @@ -121,11 +120,20 @@ module.exports = {
curly: "error",
radix: "error",
yoda: "error",
"@lwc/lwc/no-async-await": "error",
},
globals: {
require: false,
module: false,
exports: false,
requireText: false,
},
"overrides": [
{
"files": ["test/**/*.js"],
"rules": {
"@lwc/lwc/no-async-await": "off"
}
}
]
}
1 change: 1 addition & 0 deletions presets/eslint-config-origami-component/package.json
Expand Up @@ -10,6 +10,7 @@
"proclaim": "^3.4.2"
},
"dependencies": {
"@lwc/eslint-plugin-lwc": "^1.1.1",
"eslint-plugin-import": "^2.22.0"
}
}

0 comments on commit 33a14af

Please sign in to comment.