Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not allow object-shorthand and remove destructuring in functional …
…test scripts (not supported by IE11)
- Loading branch information
Rob Walch
committed
Apr 1, 2021
1 parent
22d983a
commit d642557
Showing
4 changed files
with
80 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
commonjs: true, | ||
es6: false, | ||
mocha: true, | ||
}, | ||
plugins: ['mocha', 'node'], | ||
globals: { | ||
// Test globals | ||
after: false, | ||
afterEach: false, | ||
assert: false, | ||
before: false, | ||
beforeEach: false, | ||
describe: false, | ||
expect: true, | ||
sinon: false, | ||
xit: false, | ||
}, | ||
rules: { | ||
'object-shorthand': ['error', 'never'], // Object-shorthand not supported in IE11 | ||
// destructuring is not supported in IE11. This does not prevent it. | ||
// ES6 env settings in parent files cannot be overwritten. | ||
'prefer-destructuring': ['error', { object: false, array: false }], | ||
'one-var': 0, | ||
'no-undefined': 0, | ||
'no-unused-expressions': 0, | ||
'no-restricted-properties': [ | ||
2, | ||
{ property: 'findIndex' }, // Intended to block usage of Array.prototype.findIndex | ||
{ property: 'find' }, // Intended to block usage of Array.prototype.find | ||
{ property: 'only' }, // Intended to block usage of it.only in commits | ||
], | ||
'node/no-restricted-require': ['error', ['assert']], | ||
'mocha/no-mocha-arrows': 2, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters