Skip to content

Commit 6ff5449

Browse files
authored
Merge pull request #25 from Expensify/andrew-lint-fix
Fix bugs found with new eslint rule
2 parents a79dde5 + 84fc1bc commit 6ff5449

File tree

6 files changed

+177
-7
lines changed

6 files changed

+177
-7
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: './index.js'
2+
extends: './index.js',
33
}

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
plugins: ['@lwc/eslint-plugin-lwc'],
23
extends: [
34
'airbnb',
45
require.resolve('./rules/style'),
@@ -11,6 +12,7 @@ module.exports = {
1112
jquery: true,
1213
node: true
1314
},
15+
parser: 'babel-eslint',
1416
parserOptions: {
1517
ecmaVersion: 2018,
1618
sourceType: 'module',

package-lock.json

+168-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-expensify",
3-
"version": "2.0.13",
3+
"version": "2.0.15",
44
"description": "Expensify's ESLint configuration following our style guide",
55
"main": "index.js",
66
"repository": {
@@ -9,6 +9,7 @@
99
},
1010
"dependencies": {
1111
"@lwc/eslint-plugin-lwc": "^0.11.0",
12+
"babel-eslint": "^10.1.0",
1213
"eslint": "6.8.0",
1314
"eslint-config-airbnb": "18.0.1",
1415
"eslint-config-airbnb-base": "14.0.0",

rules/es6.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ module.exports = {
1818
}],
1919

2020
// Do not allow the use of async/await
21-
'lwc/no-async-await': 'error',
21+
'@lwc/lwc/no-async-await': 'error',
2222
}
2323
};

rules/react.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ module.exports = {
1919
'react/forbid-prop-types': 'error',
2020
'react/no-string-refs': 'error',
2121

22-
// Rather then blindly enforcing destructuring assignments, we'll trust the author's best judgement on when
23-
// to make use of them, and when not; see https://github.com/Expensify/Style-Guide/pull/60 for more details
24-
'react/destructuring-assignment': 'warn',
22+
// Do not warn or error for destructuring
23+
// See: https://github.com/Expensify/Style-Guide/blob/master/javascript.md#destructuring
24+
'react/destructuring-assignment': 'off',
2525

2626
// New versions of react are removing some methods, and those methods have been prefixed with "UNSAFE_" for now.
2727
// We need to prevent more usages of these methods and their aliases from being added

0 commit comments

Comments
 (0)