-
Notifications
You must be signed in to change notification settings - Fork 0
/
unicorn.js
31 lines (30 loc) · 1.02 KB
/
unicorn.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// @ts-check
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: [
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/configs/recommended.js
'plugin:unicorn/recommended',
],
plugins: ['unicorn'],
rules: {
/**
* eslint-plugin-unicorn (override on top of 'recommended')
*
* @see
* https://github.com/sindresorhus/eslint-plugin-unicorn
*/
'unicorn/explicit-length-check': 0,
'unicorn/prevent-abbreviations': 0,
'unicorn/consistent-function-scoping': 0,
// Each project should define it's own filename casing for different folders
'unicorn/filename-case': 0,
// Turn back on as it is turned off in `unicorn/recommended`
'no-nested-ternary': 1,
// This rule allow single line nested ternary, which we don't like
'unicorn/no-nested-ternary': 0,
// Too many false positives
'unicorn/no-array-method-this-argument': 0,
// Doesn't play nice with TypeScript in certain cases
'unicorn/no-useless-undefined': 'off',
},
};