forked from tibdex/github-app-token
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
52 lines (51 loc) · 1.49 KB
/
.eslintrc.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"use strict";
module.exports = {
env: {
es6: true,
},
extends: [
"plugin:unicorn/recommended",
"xo",
"xo-typescript",
"prettier",
"prettier/@typescript-eslint",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2018,
project: "tsconfig.json",
sourceType: "module",
},
plugins: ["sort-destructure-keys", "typescript-sort-keys", "unicorn"],
root: true,
rules: {
// @actions/github uses a lot of snake_case keys.
"@typescript-eslint/camelcase": "off",
// TypeScript is good at type inference and already requires types where they matter: exported symbols.
"@typescript-eslint/explicit-function-return-type": "off",
// We use sort-keys instead.
"@typescript-eslint/member-ordering": "off",
"arrow-body-style": "error",
// Forbid function declarations
"func-style": ["error", "expression", { allowArrowFunctions: true }],
"no-console": "error",
// TypeScript already takes care of that. See https://github.com/bradzacher/eslint-plugin-typescript/issues/110.
"no-undef": "off",
"object-shorthand": [
"error",
"always",
{ avoidExplicitReturnArrows: true },
],
"sort-destructure-keys/sort-destructure-keys": [
"error",
{ caseSensitive: false },
],
"sort-keys": [
"error",
"asc",
{ caseSensitive: false, minKeys: 2, natural: true },
],
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
},
};