-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.js
More file actions
92 lines (92 loc) · 2.3 KB
/
.eslintrc.js
File metadata and controls
92 lines (92 loc) · 2.3 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
extends: [
"next",
"airbnb",
"airbnb-typescript",
"plugin:react/jsx-runtime",
"prettier",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:typescript-sort-keys/recommended",
"plugin:storybook/recommended",
],
plugins: [
"react",
"@typescript-eslint",
"sort-keys-fix",
"typescript-sort-keys",
],
parserOptions: {
project: "./tsconfig.json",
},
parser: "@typescript-eslint/parser",
ignorePatterns: ["**/*.js", "**/*.d.ts"],
rules: {
"class-methods-use-this": "off",
"no-constructor-return": "off",
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.stories.*", "**/*.test.*", "jest.*"] },
],
"@typescript-eslint/quotes": "off",
"react/jsx-sort-props": [
"error",
{
callbacksLast: true,
shorthandFirst: true,
},
],
"react/function-component-definition": [
"error",
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],
"sort-keys-fix/sort-keys-fix": "error",
"import/order": [
"error",
{
alphabetize: {
order: "asc",
caseInsensitive: true,
},
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type",
],
pathGroups: [
{
pattern: "react",
group: "builtin",
position: "before",
},
],
pathGroupsExcludedImportTypes: ["react"],
"newlines-between": "always",
},
],
"no-console": "error",
"@typescript-eslint/comma-dangle": "off",
"import/prefer-default-export": "off",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"operator-linebreak": "off",
"react/jsx-props-no-spreading": "off",
"@typescript-eslint/indent": "off",
"implicit-arrow-linebreak": "off",
"react/require-default-props": "off",
"object-curly-newline": "off",
"consistent-return": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"react/prop-types": "off",
},
};